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
Joey2022
4 years agoRegular Visitor
Hi Ashish Mathur,
Thank you for working it out. I still digest your DAX code, not really understand about how to calculate the Previous day and the Sales in the day.
I am trying with my data. It's like a blind puzzle haha doesn't work out as expected.
Joey
Ashish_Mathur
Super User
4 years agoYou are welcome. If my previous reply helped, please mark it as Answer.