Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
 
					
				
		
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 - MinValueIt 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 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | 
| User | Count | 
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |