Forum Discussion
Anonymous
4 years agoNot applicable
Calculating Weekly Consumption on Visual Table
Hi, This might be a super simple fix and i am just dumb but I want to create a new measure that would give me the difference between the Totals between 2 days. For example, I would like to know wha...
- 4 years ago
Hi Anonymous
It would be better if you could provide some sample data. Assume your data is like below and that you have a date table connected to fact table, you can create below measure to get the weekly total difference.
Weekly Diff = var _thisWeekTotal = SUM('Table'[Sales]) var _previousWeekTotal = CALCULATE(SUM('Table'[Sales]),DATEADD('Date'[Date],-7,DAY)) return _thisWeekTotal-_previousWeekTotalResult
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
v-jingzhang
4 years agoCommunity Support
Hi Anonymous
It would be better if you could provide some sample data. Assume your data is like below and that you have a date table connected to fact table, you can create below measure to get the weekly total difference.
Weekly Diff =
var _thisWeekTotal = SUM('Table'[Sales])
var _previousWeekTotal = CALCULATE(SUM('Table'[Sales]),DATEADD('Date'[Date],-7,DAY))
return
_thisWeekTotal-_previousWeekTotal
Result
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.