Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am trying to calculate the difference between values of a column from a particular value of same column. I want to create a DAX field - "Diff of Bill from F" that calculate the difference in bill from the bill of Company F. I also have a rank column based on the bill amount but I am not sure if that could be used to calculate this.
I am currently stuck on this, I've found similar questions but I couldn't apply them to my problem as most of them are calculating consecutive differences.
Year | Month | Company | Bill | Diff of Bill from F |
2020 | June | A | 954 | -181 |
2020 | June | B | 949 | -176 |
2020 | June | C | 908 | -135 |
2020 | June | D | 811 | -38 |
2020 | June | E | 809 | -36 |
2020 | June | F | 773 | 0 |
2020 | June | G | 754 | 19 |
Any help would be greatly appreciated.
Thank you.
Solved! Go to Solution.
Thank you. I was able to solve by doing a slight change in the DAX. Using below DAX I was able to get the desired result.
here's the pseudo code for the measure. Adjust as needed. Basically eliminate the company from the filter context to find the F value.
Diff =
var f = calculate (sum (bill), filter(allexcept(table,company),company="F"))
return sum(bill)-f
Thank you. I was able to solve by doing a slight change in the DAX. Using below DAX I was able to get the desired result.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |