Forum Discussion
DAX
- 1 year ago
Hi prashantg364
This one is quite tricky and complex. It involves a disconnected table that contains all possible date combinations of column1 vs. column3 and column2 vs. column3, along with the actual date columns. Additionally, there's another disconnected table for the dates to be compared. It's challenging to explain the process in detail, so please refer to the attached PBIX file for a clearer understanding.
prashantg364 , I think visual calculation can help or offset function can help
Assume you are using measure then you can diff for each date like
diff = [Measure]- calculate([Measure], OFFSET(-1, ALLSELECTED('Date'[Date]),ORDERBY('Date'[Date])))
or check Visual Calculations in Power BI- February 2024 Update RUNNINGSUM, RANGE, MOVINGAVERAGE, COLLAPSE, COLLAPSEALL, EXPAND, EXPANDALL, FIRST, LAST, PREVIOUS, and NEXT
https://www.youtube.com/watch?v=bKD9T0EWgQo&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L