Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
prashantg364
Helper II
Helper II

DAX

PBI Query.JPG

 

Based on Date selection my Table is created for the selcted dates.
now i want to add 2 more columns in my table,
first column: Delta of column 1& Column 3 (i.e Delta of 27-1-25 & 3-2-25)
Second column: Delta of column 2& Column 3 (i.e Delta of 2-2-25 & 3-2-25)

I can select different dates based on requirement, but by 2 columns formula will be fixed, i.e colum 3-column1 & column 3-column 2. And my table will have only 3 dates data.

How can i do this?


 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

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.

danextian_0-1738582349537.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

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.

danextian_0-1738582349537.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
amitchandak
Super User
Super User

@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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.