Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 216109

Compare Last Week's Sum and Past Two Week's Sum Average

$
0
0

Afternoon,

 

I'm trying to build a guage to compare the sum of last week's sessions with the average sum of the past two weeks.

 

For Example:

Week One: 10 Page Hits

Week Two: 20 Page Hits

 

So; Last Week's Sum of Page hit's is 10.

And the Last Two Week's Sum's Average by Week is (10+20/2) = 15

 

I've given it a try using dateadd, datesinperiod, datesbetween and fiddling around with some EARLIER or Date[DateKey]-28 for example; but since I need it on a rolling basis; we can't simply choose between a specific start and end date.

 

If I try to do:

Past Two Weeks Sum Average = Calculate(Sum(NumberofSessions), DATESINPERIOD (NumberofSessionsDateTable, TODAY(), -14, DAY))

It returns me of course the sum of the past two weeks.

 

I've thought of maybe breaking it up and using measures and some addition and subtraction to make it work; but I get stuck with the same issue of how for example to choose between -7 and -14 day interval on a rolling basis.

 

I'd prefer not to have to dynamically filter a bunch of tables to do this as I want to compare over a few different periods (enough so that it would take ages).

 

Any thoughts would be greatly appreciated.


Viewing all articles
Browse latest Browse all 216109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>