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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

DAX code does not take the filter in the code

Hi Guys,

 

I have the following problem. Below you see mine DAX code and I get the correct result when I filter on the left visual to 0-1 maand indicator to 1. But in the right visual I dont have this measure so that is why I putted this measure in the DAX code as filter. Unfortunatelly I dont get the same result as left visual. I tried many many Code like SUMX but not solution.

 

Korte funding 0-1 mnd = 

Var REPO = calculate( sum( FACT_SCHEDULE[amt_principal_adjustment_eur]), Portfolio[int_ifrs_product] = 207)
Var DEPO = calculate( sum( FACT_SCHEDULE[amt_principal_adjustment_eur]), Portfolio[int_ifrs_product] = 202)
Var CP =  calculate( sum( FACT_SCHEDULE[amt_principal_adjustment_eur]), Portfolio[int_ifrs_product] = 205, Portfolio[txt_paper] = "CP")
VAR A = [0-1 maand indicator]
Return CALCULATE((REPO + DEPO + CP), FILTER(Trade, [0-1 maand indicator] = 1))

 

 

CR72021_0-1648048298209.png

 

5 REPLIES 5
Anonymous
Not applicable

Please can someone help me with?

v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Could you pls share your pbix file ,and remember to remove confidential data.

 

Best Regards

Lucien

Anonymous
Not applicable

Hi @v-luwang-msft ,

 

Unfortunately not because I am using SSAS so direct query connection. Which Information do you that I can provide you?

amitchandak
Super User
Super User

@Anonymous , if this is a measure [0-1 maand indicator]

you have to use filter using visual group by 

 

like

Sumx(filter(values(Trade[Column]) , [0-1 maand indicator] = 1), CALCULATE((REPO + DEPO + CP)))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak ,

 

I tried your code but I am getting very different result. see below

 

CR72021_0-1648050774133.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors