Forum Discussion
Anonymous
6 years agoNot applicable
Using dates in column as slicer
Hi, I have a table with Measures based on a slicer for transaction date (see screenshot). I now want to be able to have a seperate table with a week by week comparison of the measu...
- 6 years ago
Hi Anonymous ,
You may create measures like DAX below.
This week = CALCULATE(SUM(Table[Amount]),FILTER(ALLSELECTED(Table),YEAR(Table[Date])=YEAR(Table[Date])&&WEEKNUM(Table[Date])=WEEKNUM(MAX(Table[Date])))) Last week = CALCULATE(SUM(Table[Amount]),FILTER(ALLSELECTED(Table),YEAR(Table[Date])=YEAR(Table[Date])&&WEEKNUM(Table[Date])=WEEKNUM(MAX(Table[Date]))-1)) Diff= [This week]- [Last week]Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-xicai
6 years agoCommunity Support
Hi Anonymous ,
You may create measures like DAX below.
This week = CALCULATE(SUM(Table[Amount]),FILTER(ALLSELECTED(Table),YEAR(Table[Date])=YEAR(Table[Date])&&WEEKNUM(Table[Date])=WEEKNUM(MAX(Table[Date]))))
Last week = CALCULATE(SUM(Table[Amount]),FILTER(ALLSELECTED(Table),YEAR(Table[Date])=YEAR(Table[Date])&&WEEKNUM(Table[Date])=WEEKNUM(MAX(Table[Date]))-1))
Diff= [This week]- [Last week]
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.