Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

The SUM function only accepts a column reference as an argument.

Hi, 

 

Actually I'm trying to calculate the measure with foloowing formula but it is giving me error "The SUM function only accepts a column reference as an argument."

 

Fomula - 

 

''' EXP(SUM(LN(1 + Query1[FundReturn]) * 1))'''

 

DAX Syntax - 

 
''' Expost_CumRet =
CALCULATE(
EXP(SUM(LN(1 + Query1[FundReturn]) * 1)),
FILTER(ALLSELECTED(Query1), Query1[Index.1]<=Max(Query1[Index.1])
)'''
)

 

 

Can anybody please help me in this!! Thanks

  • Try sumx

    Expost_CumRet =
    CALCULATE(
    EXP(SUMx(Query1,LN(1 + Query1[FundReturn]) * 1)),
    FILTER(ALLSELECTED(Query1), Query1[Index.1]<=Max(Query1[Index.1])
    )

1 Reply

  • Try sumx

    Expost_CumRet =
    CALCULATE(
    EXP(SUMx(Query1,LN(1 + Query1[FundReturn]) * 1)),
    FILTER(ALLSELECTED(Query1), Query1[Index.1]<=Max(Query1[Index.1])
    )