Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!
SOLVED

Calculated Metric Builder

Avatar

Level 2

Hi there, 

 

Apologies if this has been asked before.

 

I'm looking for a way to add date ranges into a metric I am trying to calculate - When I try to natively go straight into "Metrics it doesn't offer date ranges"

 

Does that mean I will need to great a segment first to include the date range there and then pull that into the metric 

 

I.e Vists (today) - Visits (Yesterday) = number

 

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

Is your page ID an eVar? Is it being set on Actions as well as Page Views?

 

I just tested this.. I used both standard page dimension and yesterday, AND my 'page name' eVar and Yesterday, the values match for me in both cases... 

 

BUT, did you try just creating a segment that is just date based? Then stack with your dimension?

 

Jennifer_Dungan_0-1677255702672.png

 

 

However, if you are always comparing Today vs Yesterday; why don't you just create this:

Jennifer_Dungan_7-1677256356499.png

 

 

Then select those two columns, right click, "Create metric from selection"

Jennifer_Dungan_8-1677256371551.png

 

 

Then select "Divide" or "Percent Change"

Jennifer_Dungan_9-1677256392053.png

 

 

To end up with this:

Jennifer_Dungan_10-1677256443573.png

 

 

 

Though, I will caution the use of comparing "Today" with anything else; since "Today" (unless you are checking at the data right before midnight) will always be a partial day of data, so the comparison will always look bad... (full day vs partial day). You might be better off testing "Yesterday" with "2 Days Ago" so you are at least comparing a full set of data...

 

 

There are reasons to have date logic built into calculated metrics, I am not sure if this scenario needs it....

View solution in original post

5 Replies

Avatar

Community Advisor and Adobe Champion

That is currently how I do it... since you are correct... Date Ranges don't appear to be available directly in calculated metrics

Avatar

Level 2

Thank you for the clarity on thie Jennifer, one observation you may be able to help answer, for what ever reason when I pull in the Page_ID and the date i.e. Yesterday and 2 Days Ago to create two seperate segments, the number I am given on this new segment differs by to the original Page_ID (if I were to just create a view in a blank panel with Page_ID(Name) in the Dimension section and (Visits and Yesterday) in the Metric section - Does this make sense and any reason for this behaviour?

 

i.e. if i manually pull the number for Page_ID (Name) with Visits and Yesterday i Get 11,000

but 

If I make a segment for the same thing (excluding visits as it already has that added in the segment break down) I get 10,900

 

Avatar

Correct answer by
Community Advisor and Adobe Champion

Is your page ID an eVar? Is it being set on Actions as well as Page Views?

 

I just tested this.. I used both standard page dimension and yesterday, AND my 'page name' eVar and Yesterday, the values match for me in both cases... 

 

BUT, did you try just creating a segment that is just date based? Then stack with your dimension?

 

Jennifer_Dungan_0-1677255702672.png

 

 

However, if you are always comparing Today vs Yesterday; why don't you just create this:

Jennifer_Dungan_7-1677256356499.png

 

 

Then select those two columns, right click, "Create metric from selection"

Jennifer_Dungan_8-1677256371551.png

 

 

Then select "Divide" or "Percent Change"

Jennifer_Dungan_9-1677256392053.png

 

 

To end up with this:

Jennifer_Dungan_10-1677256443573.png

 

 

 

Though, I will caution the use of comparing "Today" with anything else; since "Today" (unless you are checking at the data right before midnight) will always be a partial day of data, so the comparison will always look bad... (full day vs partial day). You might be better off testing "Yesterday" with "2 Days Ago" so you are at least comparing a full set of data...

 

 

There are reasons to have date logic built into calculated metrics, I am not sure if this scenario needs it....

Avatar

Level 2

This is exactly the solution I needed! (the bottom one)

 

Thankfully I will only be comparing Yesterday and 2 Days ago - Never "Today" - Sorry if I wrote Today, wasn't intended!

Avatar

Community Advisor and Adobe Champion

Lol.. no worries.. I do that too sometimes, but just wanted to clarify just in case

 

I have non-technical users do that in my organization, then freak out cause today is so low... then I have to remind them its only a partial day