Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
105 | |
77 | |
67 | |
63 |
User | Count |
---|---|
144 | |
107 | |
105 | |
82 | |
69 |