Forum Discussion
NilR
4 years agoPost Patron
Wrong Total FOR Addcolumns(Summarize())
I have two measures, but the second one returns wrong total. I added AddColumns to optimize the query. Any suggestions would be great. Thanks!
amitchandak
4 years agoSuper User
NilR , move filter inside the measure and check
CALCULATETABLE(
ADDCOLUMNS(SUMMARIZE('PHA', '0PHA'[CNSR_INDV_ID]),
"_BIOM", 0,
"_PHA",0,
"_CTC",CALCULATE(SUMX(values('0630 BIOMPHA'[ENRL_DATE]),MAX('PHA'[CTC]),
FILTER('PHA',([ENRL_DATE]>= Min_Date && [ENRL_DATE]<= Max_Date) && [GP_NB]=_gpnb
&& [CTC] >0))) ) )
NilR
4 years agoPost Patron
😫ðŸ˜It's still not working 😞 Thank you so much! any other recommendation?