Forum Discussion
Joey2022
4 years agoRegular Visitor
Calculated column to show difference value btw rows
Hi there! I need a favor from you guys, experts. I stucked in the matter for weeks. Pls kindly help me out. The matter is: I want to find the difference value of sale btw 2 days as: Date Sal...
- 4 years ago
Hi,
Try this
- Create a Calendar Table and build a relationship from the Date column of your Data Table to the Date column of the Calendar Table
- To your visual, drag Date from the Calendar Table.
- Write these measures:
Sales = sum(Data[SaleAmount])
Previous day sales = calculate([Sales],previousday(Calendar[Date]))
Delta = [Sales]-[Previous day sales]
Hope this helps.
- 4 years ago
Ashish_Mathur
4 years agoSuper User
Hi,
Try this
- Create a Calendar Table and build a relationship from the Date column of your Data Table to the Date column of the Calendar Table
- To your visual, drag Date from the Calendar Table.
- Write these measures:
Sales = sum(Data[SaleAmount])
Previous day sales = calculate([Sales],previousday(Calendar[Date]))
Delta = [Sales]-[Previous day sales]
Hope this helps.
Joey2022
4 years agoRegular Visitor
Thank you Ashish Mathur.
It really worked the way I expect. I am really appreciate your guide. Very gentle help.
Joey
- Ashish_Mathur4 years agoSuper User
You are welcome.