- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Table with three columns, how to calculate the difference of only two of those columns.
I have a matrix I am creating. The columns are only three years of activity and I want to show the difference between only the two final years while still showing the first year.
The matrix currently looks like this
I want to add a column that is the Difference between 2024 and 2025, but 2023 needs to remain in the table.
The data UI is like this:
And this is the actual table
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @AK_Micro_User ,
Based on my testing, please try the following methods:
1.Create the measure to calculate difference.
Difference 2024 - 2025 =
VAR Amount2024 =
CALCULATE(
SUM('Test Data'[Amount]),
'Test Data'[Year] = 2024
)
VAR Amount2025 =
CALCULATE(
SUM('Test Data'[Amount]),
'Test Data'[Year] = 2025
)
RETURN
IF(SELECTEDVALUE('Test Data'[Year]) = 2024, Amount2024 - Amount2025, BLANK())
2.Drag the measure into the matrix visual.
3.The result is shown below.
What’s more, set the wrap in the format visual.
Drag the border to hide the other difference.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @AK_Micro_User ,
Based on my testing, please try the following methods:
1.Create the measure to calculate difference.
Difference 2024 - 2025 =
VAR Amount2024 =
CALCULATE(
SUM('Test Data'[Amount]),
'Test Data'[Year] = 2024
)
VAR Amount2025 =
CALCULATE(
SUM('Test Data'[Amount]),
'Test Data'[Year] = 2025
)
RETURN
IF(SELECTEDVALUE('Test Data'[Year]) = 2024, Amount2024 - Amount2025, BLANK())
2.Drag the measure into the matrix visual.
3.The result is shown below.
What’s more, set the wrap in the format visual.
Drag the border to hide the other difference.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thank you so much! I am still so new to DAX that seeing it written out from the perspective of my data is incredibly useful. The hiding columns trick is also great to know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Mixing concepts in the same visual will confuse your users.
Anyway - you can use Visual Calculations to achieve that.

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
02-11-2024 12:12 AM | |||
03-26-2024 03:14 AM | |||
03-25-2024 04:57 PM | |||
05-21-2024 08:34 AM | |||
06-17-2024 06:42 AM |
User | Count |
---|---|
90 | |
82 | |
57 | |
41 | |
39 |