Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi
I have a table with a calculated column to show current stock minus next 3 months forecast, with the goal of flagging which products have too much cover.
Some of these return a negative value, which is good as it means we don't have too much stock. To negate these results, I added an IF statement to return that result as 0 instead.
The issue I have now is that the total of that column was a negative amount and it now shows as 0 too, where I want it to show the sum of the positive values.
can I somehow exclude the Totals value from this?
Solved! Go to Solution.
@BeckersN , You need to use sumx
return
Sumx(Values(Table[Column]), if(Result <0, 0, Result )
for more than one column
return
Sumx(Summarize(Table, Table[Column]), if(Result <0, 0, Result )
@BeckersN , You need to use sumx
return
Sumx(Values(Table[Column]), if(Result <0, 0, Result )
for more than one column
return
Sumx(Summarize(Table, Table[Column]), if(Result <0, 0, Result )
User | Count |
---|---|
77 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
93 | |
50 | |
49 | |
46 |