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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have two measures in a matix. One showing negative values and one showing positive values.
However i can't get a total in each coloumn. I one get ne total and it's the sum of both measures.
The measures are:
Foran = IF(CALCULATE( [Produktion 60 dg.] - [Netto IVA] )>=0;CALCULATE( [Produktion 60 dg.] - [Netto IVA]);BLANK())
and
Bagud = IF(CALCULATE( [Produktion 60 dg.] - [Netto IVA] )<0;CALCULATE( [Produktion 60 dg.] - [Netto IVA]);BLANK())
I've Googled and found that i probably have to use SUMX or HASONEVALUE but i can't figure the syntax out.
Any help constructing the syntax would be appreciated.
Hi @HenrikH29
Please use the following DAX :
Foran = SUMX ( TableName, IF(CALCULATE( [Produktion 60 dg.] - [Netto IVA] )>=0;CALCULATE( [Produktion 60 dg.] - [Netto IVA]);BLANK()) )
Similarly create for Bagud.
This should work...
Thanks,
Himanshu
Hi Himanshu
Thanks for your quick reply
The syntax dosn't generate an error, however the clculated resultats are not correct.
"TableName" is to be substituted with the tablename that holds the measures - right?
"Produktion 60 dg" is calculated this way : Produktion 60 dg. = CALCULATE(Sum(DSP_SAGPOST[Igang. arb.]);Kalender[Dato]>=TODAY()-60)
and Netto IVA = CALCULATE(sum(DSP_SAGPOST[Igang. arb.]))-CALCULATE(SUM(DSP_SAGFAKGEM[Aconto]))
This is the resulat i get using your suggestion:
In my previous posting you can se the correct results (but with incorrect totals).
Any ideas?
Check out if a label works correctly. If not, try using "0" instead of BLANK to complete the areas.
Regards
Happy to help!
Tried using "0" instead of BLANK() but wtihout any luck.
There's one dealing with it here, but I just can't get the syntax right trying his solution.
http://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/m-p/63376
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.