Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

previous week

Hi, 

I would like to create a measure that allowed me to show the previous week value. 

When the user click wk 32, then the graph will shown the current week (wk32) and previous week (wk31) data in a graph. 

 

the graph is clustered column chart and the xaxis will be category, weekday short; yaxis will be previous week (light colour) and current week (dark colour). 

 

Previous Week = calculate(sum('Flow '[Value]),FILTER(all('Calendar'),'Calendar'[Date]=MAX('Calendar'[Date])-7))

 

current week=sum('Flow'[Value])

The issue that i having now is the pic 1 is under category (for the previous week suppose the sum of pic 2 but just obtain sunday value).  Can anyone help me to change the previous week dax so that the under category can get the sum from monday to sunday. 

 

Thanks for your help. 

(pic1)

(pic2)

 

2 Replies