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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors