Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Please let me know how to use column() or column name in sum if statement
Example
Sum(if(Indicator='N', Column(16))
or
Sum(if(Indicator='N', [Column Name])
I am not able to use both statement in sum if statement
Thanks in advance
I think all you might need an extra ')' at the end of the statement?
Sum(if(Indicator='N', Column(16)))
or
Sum(if(Indicator='N', [Column Name]))
It might be useful to see your expression in the column being referenced and what kind of outcome you are trying to achieve.
You could use something like:
if(Indicator='N', Column(16))
but not within aggregation-functions like sum(). If you really want to apply an aggregation you need to use your origin expression - probably wrapped with an aggr() function like:
sum(aggr(YourOriginExp, Dim1, Dim2))
- Marcus
Thanks for the reply,
can you send me the syntax or sample code with ')'
Hi,
Thanks for the reply.
Yes the column(16) has the below expression with OR condition
sum({<[Indicator={'Y'}>}HC * [Better Estimate_Input]
+
(sum({<[Indicator={'N'}>}HC_Input)* AVG({<[Event Id]={'BAM','BAT'}>} [PY TC US]) )
)
next column i am using the sum if statement
sum(if(indicator='N', column(16)).
Reason using Sum if is, user inputing mulitple values in the front end / table box
Do you have Indicator as one of your dimensions in the chart?