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.
Hi can anyone explain why the total is still the same even if I applied a Filter on a measure.
The left side is just the column without filters, while the right side is the filtered one. You can see that the negative data is already blank but it still returns the same total:
Here is the measure I used:
Solved! Go to Solution.
Try like
Grand Total 2 =
var CLNTNME = FIRSTNONBLANK('Reference December AUM'[CLIENT_NAME],1)
return
calculate(SUM('Reference December AUM'[MKT_VALUE_USD]),filter('Reference December AUM','Reference December AUM'[MKT_VALUE_USD])>0))
Try like
Grand Total 2 =
var CLNTNME = FIRSTNONBLANK('Reference December AUM'[CLIENT_NAME],1)
return
calculate(SUM('Reference December AUM'[MKT_VALUE_USD]),filter('Reference December AUM','Reference December AUM'[MKT_VALUE_USD])>0))
@all Thank you for the replies, @amitchandak 's solution was the one that worked for me.
you need an iterator-function for the (sub) totals to be correct
How about this?:
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @msantillan
its difficult to answer without full data model nd data example but I guess it could be solved by using CALCULATE() over you SUM() statements, like
Grand Total 2 =
var _calcSum = CALCULATE(SUM('Reference December AUM'[MKT_VALUE_USD]))
return
if(_calcSum <0,BLANK(),_calcSum )
by the way, why do you use CLNTME in the statement?
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 |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |