Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hello I am trying to calculate the difference between mutiple columns in PowerBI. And Highlight changes above and below 50 w/ color. I haven't been able to find any examples with multiple columns. I believe I have to create a measure but I'm not sure what calcualtions to use. Any help would be much appreciated.
Hi all ,
@QuentinBl , thanks for your concern about this case, I have some additions for problem solving.
@Sk1_2 , thank you for giving a specific description of the problem. Based on your description, I will give you the following steps to solve the problem.
1.The test table Table.
2.New Measures and input the DAX code of calculating difference for individual columns.
Difference between Sum of 1 and Sum of 2 = SUM('Table'[Sum of 1])-SUM('Table'[Sum of 2])
Difference between Sum of 1 and Sum of 3 = SUM('Table'[Sum of 1])-SUM('Table'[Sum of 3])
Difference between Sum of 1 and Sum of 4 = SUM('Table'[Sum of 1])-SUM('Table'[Sum of 4])
Difference between Sum of 2 and Sum of 3 = SUM('Table'[Sum of 2])-SUM('Table'[Sum of 3])
Difference between Sum of 2 and Sum of 4 = SUM('Table'[Sum of 2])-SUM('Table'[Sum of 4])
3.Add these measures to columns.
4.Conditional formatting. Refer to Apply conditional table formatting in Power BI - Power BI | Microsoft Learn. All measures follow the steps:
a.Click the drop-down arrow, select Conditional formatting > Background color.
b.Select Rules as Format style.
c.Select Number or Percentage as value type.
d.Select the color you want to display.
You can modify them according to your needs.
5.The outcome is in the following picture.
Best Regards,
Caroline Mei
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you! Can this formula work in a Matrix?
@Sk1_2 , you can realize it in a Matrix. Now, I will show you how to realize it in a Matrix.
1.Modify the test table Table. Add a column ValueType, so that you can use it as the row later.
2.Add ValueType to Rows, and add Sum of 1, Sum of 2, Sum of 3, Sum of 4, Difference between Sum of 1 and Sum of 2, … to Values.
3.The outcome is in the following picture.
Best Regards,
Caroline Mei
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
if you want the differences between two columns, you can do this : measure = SUM(Sum of 1) - SUM(SUM of 2).. etc
if you want the differences in % to do a highlight when the differences is > than 50%, you should do something like this, and use the pourcentage as a "cell elements" :
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |