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

Getting Value Sum from previous week

$
0
0

Hi 

I have been trying to get values for previous week, unfuntuanlly it was not as easy as getting from previous month, with previousmonth function.

 Capture.PNG

I alreday used a grouped date on the left side as currently date/week.

I have tried use datesbetween and use dateadd filters but they seems unable to collect values outside the current date.

 

CALCULATE(sum(table[Quantity]), DATESBETWEEN(table[7Days], DATEADD(FIRSTDATE(table[CurrentDate]),-7,DAY),DATEADD(LASTDATE(table[CurrentDate]),-7,DAY))

 

But if I use static value date(Year,Month,Day) for the startdate and enddate in datesbetween, I was able to get value outside the currently date.

Note: 7days is grouped CurrentDate

 

Any suggestion is appreciated.


Viewing all articles
Browse latest Browse all 217083

Trending Articles



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