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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
sajjadkhan25
Helper I
Helper I

Need to add all function inside filter condition

Hi Team,@amitchandak,@Samarth_18,@parry2k


need to make this work,


COGS =
CALCULATE(
SUM('vwConsolidated2C'[COGS]),all(Ac_T1[FY]),all('Type'),USERELATIONSHIP(vwConsolidated2C[Type_new],Type2[Type]),
FILTER(DATESYTD(vwConsolidated2C[Fiscal Date]),MAX(vwConsolidated2C[fiscal_Mon_year])=SELECTEDVALUE(Ac_T2[FY]))
)

 

if i use this all function is not working how can i include in filter condition.
please help me out... 


3 REPLIES 3
Anonymous
Not applicable

Hi @sajjadkhan25 ,

 

I need more information to clarify your scenario.

Could you please provide me with more details about your table and your expected output or share me with your pbix file after removing sensitive data?

How to Get Your Question Answered Quickly - Microsoft Power BI Community

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

 

Best Regards,
Eyelyn Qin

sajjadkhan25
Helper I
Helper I

Hi @amitchandak  sir,

but for DATESYTD i have maximum limit from slicer even dax should include that condition till where running total should happen

amitchandak
Super User
Super User

@sajjadkhan25 , with help from Date table , joined with vwConsolidated2C[Fiscal Date]

 

COGS =
var _Mes = CALCULATE(SUM('vwConsolidated2C'[COGS]),USERELATIONSHIP(vwConsolidated2C[Type_new],Type2[Type]))
return
CALCULATE(_Mes,DATESYTD('Date'[Date]))

or

 

COGS =
var _Mes = CALCULATE(SUM('vwConsolidated2C'[COGS]),USERELATIONSHIP(vwConsolidated2C[Type_new],Type2[Type]))
return
CALCULATE(_Mes,,DATESYTD('Date'[Date]),all('Type')) // not sure on the need of all(Ac_T1[FY]), but you can add it here

CALCULATE(_Mes,,DATESYTD('Date'[Date]),all('Type'),all(Ac_T1[FY]))

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.