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! Get ahead of the game and start preparing now! Learn more
Hi everyone,
I'd like to calculate differences for PRICE when using multiple slicers. I would like to compare PRICE within the same PRODUCT/STATE/YEAR/SIZE. (In my dataset, I have one unique row for every combination of PRODUCT/STATE/YEAR/SIZE).
In the example below, I would want to calculate the difference in price for the blue rows, and do the same thing for the green rows.
(e.g. the difference for blue rows would be 5-3=2. The difference for green rows would be 6-5=1.)
I have 4 slicers for PRODUCT, STATE, YEAR, SIZE.
| PRODUCT | STATE | YEAR | SIZE | PRICE |
| Apple | CA | 2001 | S | 3 |
| Apple | GA | 2002 | M | 4 |
| Apple | CA | 2003 | S | 5 |
| Banana | FI | 2002 | M | 5 |
| Banana | FI | 2003 | M | 6 |
| Banana | FI | 2004 | M | 7 |
| Cherry | CA | 2002 | L | 1 |
| Cherry | FI | 2004 | M | 5 |
Thank you so much in advance for your help!!!
Solved! Go to Solution.
Hi @roundbunny ,
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a measure named ‘Price difference’
Price difference =
VAR _a = MIN('Table'[PRICE])
VAR _b = MAX('Table'[PRICE])
RETURN _b - _a
2. Fianl output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @roundbunny ,
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a measure named ‘Price difference’
Price difference =
VAR _a = MIN('Table'[PRICE])
VAR _b = MAX('Table'[PRICE])
RETURN _b - _a
2. Fianl output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thanks so much!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 57 | |
| 43 | |
| 40 | |
| 21 | |
| 17 |