Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

SET expression How to add one more condition ?

Hi All

Below expression working fine :-

Sum({$<year = {$(=Max(year)-1)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales/1000)

I need to add one more condition to above expression , that is SOURCE = TDSS , So my expression as below :-

Sum({$<year = {$(=Max(year)-1)},SOURCE = {"TDSS"}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales/1000)

But it display null. may i know where i go wrong ?

Paul

1 Solution

Accepted Solutions
kenphamvn
Creator III
Creator III

Hi

The expression is fine

Please check column name  SOURCE is correct? and  "TDSS" exist

you can test by using only new condition


Sum({$< SOURCE  ={"TDSS"}>} sales/1000)


Regards

An Pham

View solution in original post

4 Replies
kenphamvn
Creator III
Creator III

Hi

The expression is fine

Please check column name  SOURCE is correct? and  "TDSS" exist

you can test by using only new condition


Sum({$< SOURCE  ={"TDSS"}>} sales/1000)


Regards

An Pham

paulyeo11
Master
Master
Author

Hi Pham

Your propose expression work fine , but when i add one more condition :-

Sum({$< SOURCE  ={"TDSS"}>,year  ={"2018"}>} sales/1000)

it does not work. Where i go wrong ?

Paul

kenphamvn
Creator III
Creator III

Hi

Try this

Sum({$< SOURCE  ={"TDSS"} ,year  ={"2018"}>} sales/1000)

Remove ">"

Sum({$< SOURCE  ={"TDSS"}>,year  ={"2018"}>} sales/1000)

Regards

An Pham

paulyeo11
Master
Master
Author

hI pHAM

Thank you very much for your help.  Now work fine.

Paul