Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Dear all
I have two slicers, continent and countries y,
in the countries table, we have countries and items and profit
I want to be able to choose two countries and see the Absolute Subtraction value between all the items within the 2 countries that I chosed
As default, Power BI is showing the SUM.
The value in the visual should represent the subtraction of different products in Germany and Sweden.
Thanks in advance
Regards
Solved! Go to Solution.
@Anonymous
One way of doing that
=
VAR T1 =
ADDCOLUMNS (
VALUES ( 'Table'[Country] ),
"@Value", CALCULATE ( SUM ( 'Table'[Value] ) )
)
VAR MaxValue =
MAXX ( T1, [@Value] )
VAR MinValue =
MINX ( T1, [@Value] )
RETURN
MaxValue - MinValue
@Anonymous
What if you select 3 or more or even 1 what should be the expected result?
we could either limit the countries' slicer to choose only 2 ( I don't know how to do that 🙂 ) or continue subtracting from the final abstract result
@Anonymous
One way of doing that
=
VAR T1 =
ADDCOLUMNS (
VALUES ( 'Table'[Country] ),
"@Value", CALCULATE ( SUM ( 'Table'[Value] ) )
)
VAR MaxValue =
MAXX ( T1, [@Value] )
VAR MinValue =
MINX ( T1, [@Value] )
RETURN
MaxValue - MinValue
It works great
thanks a lot 🙂
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 9 | |
| 8 | |
| 7 |