Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

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

Re: How to change the meansure from sales to rEVENUE in SET expression?

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

4 Replies
paulyeo11
Valued Contributor II

Re: How to change the meansure from sales to rEVENUE in SET expression?

my QV Doc

Re: How to change the meansure from sales to rEVENUE in SET expression?

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
Valued Contributor II

Re: How to change the meansure from sales to rEVENUE in SET expression?

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
Valued Contributor II

Re: How to change the meansure from sales to rEVENUE in SET expression?

just to move this post to more recent post.

Community Browser