How can I dynamically Count Number of Days Selected in Calender

Avatar

Avatar
Validate 1
Level 2
ltaparia
Level 2

Likes

5 likes

Total Posts

29 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
ltaparia
Level 2

Likes

5 likes

Total Posts

29 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 1
View profile
ltaparia
Level 2

28-08-2019

Hi,

In a business case, I am calculating a metric and in that, I need to divide a dimension by "Number of Days an analytics user selected in the calendar" while fetching a report. Please note it is very different from Function (Approximate Distinct Count(Dimension (Days)).

Any suggestion to achieve this?

Regards

Lalit

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Shape 10
Level 6
David-123
Level 6

Likes

118 likes

Total Posts

141 posts

Correct reply

20 solutions
Top badges earned
Shape 10
Ignite 3
Seeker
Bedrock
Engage 1
View profile

Avatar
Shape 10
Level 6
David-123
Level 6

Likes

118 likes

Total Posts

141 posts

Correct reply

20 solutions
Top badges earned
Shape 10
Ignite 3
Seeker
Bedrock
Engage 1
View profile
David-123
Level 6

29-08-2019

Ok - this makes sense and wow this takes me back to when I first started using analytics and seeing products disappear from reports if there are no product views.

I have however got it working:

1823458_pastedImage_0.png

And on my results:

1823474_pastedImage_1.png

Answers (7)

Answers (7)

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

29-08-2019

sorry to disappoint you... as soon as you have a time range with at least one day where no product has been viewed, the metric doesn't work anymore. no matter if you include the "all visits segment" or not does not change the result...

so using the proposed segment might work, just be aware that there are situations where it might fool you ...

Avatar

Avatar
Validate 1
Level 2
ltaparia
Level 2

Likes

5 likes

Total Posts

29 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
ltaparia
Level 2

Likes

5 likes

Total Posts

29 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 1
View profile
ltaparia
Level 2

30-08-2019

Thanks, Will keep this in mind!

Avatar

Avatar
Validate 1
Level 2
ltaparia
Level 2

Likes

5 likes

Total Posts

29 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
ltaparia
Level 2

Likes

5 likes

Total Posts

29 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 1
View profile
ltaparia
Level 2

29-08-2019

Thanks, davidj85759080​! Appreciate your help!

Avatar

Avatar
Shape 10
Level 6
David-123
Level 6

Likes

118 likes

Total Posts

141 posts

Correct reply

20 solutions
Top badges earned
Shape 10
Ignite 3
Seeker
Bedrock
Engage 1
View profile

Avatar
Shape 10
Level 6
David-123
Level 6

Likes

118 likes

Total Posts

141 posts

Correct reply

20 solutions
Top badges earned
Shape 10
Ignite 3
Seeker
Bedrock
Engage 1
View profile
David-123
Level 6

29-08-2019

I added the segment "All Visits" as more of a background check.

This said - if you have no visitors to your website on a given day, the logic will not work.

Avatar

Avatar
Validate 1
Level 2
ltaparia
Level 2

Likes

5 likes

Total Posts

29 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
ltaparia
Level 2

Likes

5 likes

Total Posts

29 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 1
View profile
ltaparia
Level 2

28-08-2019

Hi ursboller​, Earlier I thought to use the formula for “approximate distinct count” and get the number of days that I had in my timeframe but when I use it against Product dimension, it completely shatters meaning of "approx". Please check below screen. That is why it is not at all reliable. Day.png

Also please check below thread: How to Group SKUs based on Number of Orders and to make requirement dynamic, I need day count in the time frame to be right.

davidj85759080​, It is for the same thread, we were discussing. Because of your advice, I used a static number in the denominator(30)  and that is giving correct bucketing 🙂 Thanks, but still, I am greedy to make denominator dynamic. 😛

Thanks for the time davidj85759080​ & ursboller

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

28-08-2019

I would go with the "approx count distinct" but wonder why you can't take it? in similar cases that's my prefered (only?) solution...

Avatar

Avatar
Shape 10
Level 6
David-123
Level 6

Likes

118 likes

Total Posts

141 posts

Correct reply

20 solutions
Top badges earned
Shape 10
Ignite 3
Seeker
Bedrock
Engage 1
View profile

Avatar
Shape 10
Level 6
David-123
Level 6

Likes

118 likes

Total Posts

141 posts

Correct reply

20 solutions
Top badges earned
Shape 10
Ignite 3
Seeker
Bedrock
Engage 1
View profile
David-123
Level 6

28-08-2019

Hi Lalit,

Can you explain what you are trying to do as my go to answer is what you are saying not to use. 🙂

Thanks

Dave

1822676_pastedImage_0.png