Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to comnine 2 different expression into 1 using if ?

Hi All

I have expression for table 1 as below :-

SUM({<year = {"$(=Max(year)-1)"},month={"<=$(=month)"},$(ColumnDim51)={$(ColumnDim51)}>}Amount*1)/1000

When i Press on Button STep 1 , table 1 will display 1871.

I have expression for table 2 as below :-

sum({$<year = {$(=max(year)-1)}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}$(ColumnDim51)/$(Columndim89)/1000)

When i Press on Button STep 2 , table 2 will display 1877.

May i know how to combine above 2 expression into 1 ? So that when i press button step 1 it will display 1871 and when i press step 2 it will display 1877 in table 3.

My imagine expression for table 3 is below :-

=IF([[Pls select 66 Dim]] = 'rEVENUE',

(

SUM({<year = {"$(=Max(year)-1)"},month={"<=$(=month)"},$(ColumnDim51)={$(ColumnDim51)}>}Amount*1)/1000

IF([[Pls select 66 Dim]] = 'sales',

(

sum({$<year = {$(=max(year)-1)}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}$(ColumnDim51)/$(Columndim89)/1000)

))

But cannot work.

next post i will send my QV Doc

Paul

1 Solution

Accepted Solutions
paulyeo11
Master
Master
Author

1 Reply
paulyeo11
Master
Master
Author

Already settle.