Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hello, I am trying to obtain the difference between payments on an attribute that has 2 filters, preferably all in 1 row with the difference in a column.
EG: For Hospital A, I want to look at the difference in payments/procedure by procedure code filtered on Attribute "CPT_Code" = (99285 and 99291).
It creates 2 rows and I cant figure out how to get the difference between the 2 outputs. Any assistance is greatly appreciated!
Solved! Go to Solution.
You can write the following measure:
Code Difference = CALCULATE([YourProcedureCountOrSumMeasure], 'TableName'[CPT_Code] = "99285") - CALCULATE([YourProcedureCountOrSumMeasure], 'TableName'[CPT_Code] = "99291")
Note that if the Code column is numerical you'll need to remove the "" from the formula 🙂
If I misunderstood and if it's the totals of those 2 codes then just add the CALCULATES instead of subtracting them
Proud to be a Super User!
You can write the following measure:
Code Difference = CALCULATE([YourProcedureCountOrSumMeasure], 'TableName'[CPT_Code] = "99285") - CALCULATE([YourProcedureCountOrSumMeasure], 'TableName'[CPT_Code] = "99291")
Note that if the Code column is numerical you'll need to remove the "" from the formula 🙂
If I misunderstood and if it's the totals of those 2 codes then just add the CALCULATES instead of subtracting them
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 49 | |
| 30 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 131 | |
| 103 | |
| 58 | |
| 39 | |
| 31 |