Forum Discussion
CJ_96601
6 years agoHelper V
Sum If
Please advise on how to sum all data in two columns if year is less than or equal to year selection. Table and calendar has relationship by date. Below is the same data: Year BN Bas...
- 6 years ago
Sharing:
This one works:
TotalComp =CALCULATE(SUMX(CnB_D,CnB_D[Comp]+CnB_D[Comp1]+CnB_D[Comp2]+CnB_D[Comp3]+CnB_D[Comp4]),FILTER (ALL ( 'CnB_D'[Hire Date].[Year]),'CnB_D'[Hire Date].[Year] <= MAX ( 'zCalendar'[Year])))
parry2k
6 years agoSuper User
CJ_96601 very hard to say without looking at that why that would be.You have to validate at your end or send the pbix file
CJ_96601
6 years agoHelper V
Sharing:
This one works:
TotalComp =
CALCULATE(SUMX(CnB_D,CnB_D[Comp]+CnB_D[Comp1]+CnB_D[Comp2]+CnB_D[Comp3]+CnB_D[Comp4]),
FILTER (
ALL ( 'CnB_D'[Hire Date].[Year]),
'CnB_D'[Hire Date].[Year] <= MAX ( 'zCalendar'[Year])
)
)