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 change the meansure from sales to rEVENUE in SET expression?

Hi All

My Chart 1 Expression as below  working fine :-

Sum({<year = {$(=Max(if(getselectedcount(year)=0,2015,year))-1)}

,

month = {"<=$(=Max({<year={$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}

>} sales/$(Columndim89)/1000)

Now i like to replace sales with nET_PROFIT as below :-

Sum({<nET_PROFIT={"nET_PROFIT"}>}Amount)

I try below expression in chart 2 :-

Sum({<year = {$(=Max(if(getselectedcount(year)=0,2015,year))-1)}

,

month = {"<=$(=Max({<year={$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}

>} ({<nET_PROFIT={"nET_PROFIT"}>}Amount)/$(Columndim89)/1000)

it does not work.

Paul

1 Solution

Accepted Solutions
sunny_talwar

Not sure, but may be this?

Sum({<year = {$(=Max(if(getselectedcount(year)=0,2015,year))-1)}

,

month = {"<=$(=Max({<year={$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}, nET_PROFIT={"nET_PROFIT"}

>} Amount/$(Columndim89)/1000)


Capture.PNG

View solution in original post

4 Replies
paulyeo11
Master
Master
Author

my QV Doc

sunny_talwar

Not sure, but may be this?

Sum({<year = {$(=Max(if(getselectedcount(year)=0,2015,year))-1)}

,

month = {"<=$(=Max({<year={$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}, nET_PROFIT={"nET_PROFIT"}

>} Amount/$(Columndim89)/1000)


Capture.PNG

paulyeo11
Master
Master
Author

Hi sunny

Thank you very much . The chart display the figure I need . So it must be correct . I can move on doing the report I need.

I will tick correct answer after I finish my dinner .

Paul

Sent from my iPhone

paulyeo11
Master
Master
Author

just to move this post to more recent post.