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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I am a bit confuse about the use of a variable and the use of a measure in a measure:
Here i want to have the difference between max and min per category (a and b) and afterwards sum the differences.
example:
a 2
a 1
b 3
b 10
Normal max-min = 10-1 =9
per cat : a = 2-1 =1
b = 10-3 =7
Sum a +b = 8 -----> this is what i need i a card visual
I tried to put everyting in one measure and it does not work:
Solved! Go to Solution.
HI @Anonymous,
You can use following measure if it works:
Measure =
SUMX (
SUMMARIZE (
Table,
[Type],
"Max", MAX ( Table[Value] ),
"Min", MIN ( Table[Value] )
),
[Max] - [Min]
)
Regards,
Xiaoxin Sheng
Works, very nice measure tnx!!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 59 | |
| 41 | |
| 18 | |
| 15 |
| User | Count |
|---|---|
| 106 | |
| 103 | |
| 40 | |
| 29 | |
| 29 |