Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
sravan872
Frequent Visitor

Need help in dax

1. I have a consolidated portfolio table which has fund, security, port wt, esg flag, si flag, asset class, path etc. Now i need to calculate sum(port wt) with filters as security type in (abs,cmbs,mbs) and path in (asset backed).

 

2. for 4 specific funds i need exclusive filters. for funds ntgf-gbp, ntgflf-eur, ntgf-usd and osgcu sum(port wt) if asset class is sovereign and si flag is 1 that row should be considered and it asset class is sovereign and si flag is 0 that ro should be excluded from sum(port wt).

 

Point 1 filters should apply for all funds including the funds in point2. 

Point 2 filters should be applied to only those 4 funds.

All these needs to be done in single measure and i need port wt.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @sravan872 ,

 

Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please Accept it as a solution so other members can easily find it.


Thank You

Anonymous
Not applicable

Hi @sravan872 ,

 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

 

Thank you.

Anonymous
Not applicable

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.

Anonymous
Not applicable

Hi @sravan872 ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.


Thank you.

FBergamaschi
Super User
Super User

Hi sravan872,

without tables and/or a pbix, visuals prepared and indication of the desired result it is impossible to answer.

 

Furthermore, please clarify what you mean by "filters as security type in (abs,cmbs,mbs) and path in (asset backed)"

 

Best, FB

Thanks for the reply @FBergamaschi. Please find below

sravan872_1-1750685272307.png

 

In this table, I need a new measure to calculate E/S port wt. The logic need is

ES2 =
CALCULATE(SUM(fund[PORT WT]), FILTER(VW_CONSOLIDATED_PORTFOLIO_ESG_SNAPSHOT,
NOT VW_CONSOLIDATED_PORTFOLIO_ESG_SNAPSHOT[SECURITY_TYPE] IN {"ABS", "CMBS", "MBS"} &&
 FUND[PATH_NTGI_ADDCHAR] <> "BACKED")). 
To this measure i want to add another filter for 4 specific funds B,C,D & E if asset class is SOV and si flag is 1 then include that row in the sum(port wt), if asset class is sov and si flag is 0 exclude that row from sum(port wt). this logic is only for these 4 funds. Can you help in this please. Let me know if any further details are required?
Thanks.

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

 

Hi sravan872,

thanks. Here is what is needed t be clarified/provided:

1 - please copy and past the table (I assume it is the fund table, is this correct?) not as a picture but in a format I can copy and past in Power BI. This should include all tables mentioned in your code (VW_CONSOLIDATED_PORTFOLIO_ESG_SNAPSHOT should be included as well)

2 - the column FUND[PATH_NTGI_ADDCHAR] mentioned in your code is not visible in the table, is that the FUND[PATH] column or another ?

3 - what do you mean in the bold part? "All these needs to be done in single measure and i need port wt."

Best, FB

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.