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! Request now

Reply
sgsukumaran
Resolver II
Resolver II

If statement for Calculate

I am trying to get this If statement worked on muliple Calculate logic and it always turns blank. 

 

,IF( [Base]=2 ,(CALCULATE( [Sales] ,FILTER( ALL('Fiscal Calendar') ,'Fiscal Calendar'[LYRollingFiscalWeek]=1 ) ,KEEPFILTERS('Sales'[UnitID]=51) ))
,CALCULATE( [Sales] ,FILTER( ALL('Fiscal Calendar') ,'Fiscal Calendar'[LYRollingFiscalQuarter]=1 ) ,KEEPFILTERS('Sales'[UnitID]=51)) ) 

 

When I run this separately they run fine.

 

CALCULATE( [Sales] ,FILTER( ALL('Fiscal Calendar') ,'Fiscal Calendar'[LYRollingFiscalWeek]=1 ) ,KEEPFILTERS('Sales'[UnitID]=51) ) with base = 2

 

 

1 REPLY 1
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @sgsukumaran,

 

Can you share the pbix file? A dummy one is enough. A measure evaluates under its context. The formula just looks fine. So there could be something wrong with other parts.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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