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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Dear all,
I'm looking to Subtract the "MAX" from the "MIN" but excluding "0" otherwise I can't calculate the sum of the kilometres driven during a period. If someone has an idea it would be highly appreciated. I thought maybe to work with an "IF" formula but I'm not sure if this would be the way to go. Also I can't put a filter on "Kilometerstand" as I have other columns with values which would disapear.
Thanks in advance for your support.
Example
Measure
Solved! Go to Solution.
Hi @Anonymous ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _maxvalue=MAXX(ALL('Table'),[Kilometerstand])
var _minvalue=MinX(FILTER(ALL('Table'),[Kilometerstand]<>0),[Kilometerstand])
return
_maxvalue- _minvalue
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi,
Share the download link of your PBI file and show the expected result very clearly.
Hi @Anonymous ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _maxvalue=MAXX(ALL('Table'),[Kilometerstand])
var _minvalue=MinX(FILTER(ALL('Table'),[Kilometerstand]<>0),[Kilometerstand])
return
_maxvalue- _minvalue
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 51 | |
| 41 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 134 | |
| 111 | |
| 50 | |
| 31 | |
| 29 |