Forum Discussion
Need help in dax
- Anonymous1 year ago
Hi sravan872
Thank you for reaching out to the Microsoft fabric community forum. Thank you FBergamaschi for your inputs on this issue.
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it.
I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Thanks for the reply FBergamaschi. Please find below
In this table, I need a new measure to calculate E/S port wt. The logic need is
My code
ES2 =
CALCULATE (
SUM ( 'PowerBI_Sample_Portfolio'[PORT WT] ),
FILTER (
'PowerBI_Sample_Portfolio',
NOT 'PowerBI_Sample_Portfolio'[SECURITY TYPE] IN { "ABS", "CMBS", "MBS" }
&& 'PowerBI_Sample_Portfolio'[PATH] <> "BACKED"
&&
NOT 'PowerBI_Sample_Portfolio'[FUND] IN { "B", "C", "D", "E" }
||
(
'PowerBI_Sample_Portfolio'[FUND] IN { "B", "C", "D", "E" }
&&
(
'PowerBI_Sample_Portfolio'[ASSET CLASS] = "SOV"
&& 'PowerBI_Sample_Portfolio'[SI FLAG] = 1
)
)
)
)
my code is a bit different than the one from v-tsaipranay, let us know if either of the two understood fully your request
Pls mark as kudos and solution in case my answer or v-tsaipranay one!
Best
FB