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

Sum past week with dateadd function

$
0
0

Morning,

 

I could have sworn I have used this before and for some reason now it isn't working.

 

I'm attempting to calculate the sum of sessions of the past seven days on a rolling basis. I have a date table, with a relationship to the date of the table containing the number of sessions per day and date.

 

Formula used;

SumpastweekSessions = CALCULATE(Sum('NumberofSessions'[Sessions]), DATEADD('NumberofSessionsDateTable'[DateKey], -7,DAY))

The answer should be 30; but instead I'm recieving 2734.

 

When I change the number of the interval the value changes; I feel I'm missing something here.

 

 


Viewing all articles
Browse latest Browse all 213819

Trending Articles



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