Forum Discussion
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
- amitchandakSuper 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 hereCALCULATE(_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. - sajjadkhan25Helper 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 - AnonymousNot 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