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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PB_user
New Member

DAX to calculate difference between two files/versions?

Hello, first I would like to say that I am not familiar with POWER BI, and therefore I am looking for help.

I wonder if what I have currently in mind is possible in POWER BI and in which direction I should look for the solution.

So I have the following situation:

I have two files with some values, grouped by type. The content with measures etc of both files would be loaded and available in a one physical table (call it FACT table)
What I need is to compare the measures and show the difference between file 1 and file 2. (like measure of file_1 - measure of file_2 = diff)
Here it is important to note that some types may not be present in the files (see type_4 in the example), and then the difference is calculated by comparing one value and treating the other for example as 0

Later I want to specify which two files I want to compare with each other using selection boxes, but this is something as a next step

I have provided a screen with 2 versions of how this might look, and I have a question for you:

Which version from the example can be displayed and possible to do in Power bi?
And how can DAX/or maybe something else looks to calculate the difference in both examples, considering that all data is in one table.

Thank you for your input and help
Jan

 

test_grid.png

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely. A screenshot is not useful.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.