Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

aggr(sum(total <$(ColumnDim_p)> sales) How to replace with rEVENUE ?

Hi All

I have expression as below work fine for chart 1:-

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

I also have expression below work fine for chart 2 :-

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

when user select Dim2 = rEVENUE , I have convert the above expression to below , and this expression i insert at Chart 3 :-

sum({$<year = {"<=$(=max(year)) >=$(=max(year)-12)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} rEVENUE={rEVENUE}>}Amount/1000/$(Columndim89))

Chart 3 Dimension expression as below :-

=if(aggr(sum(sales),$(ColumnDim101)) / aggr(sum(total <$(ColumnDim_p)> sales), $(ColumnDim101)) > 0.00001, $(ColumnDim101), ' Other')

Can some one advise me how to change the above expression sales to rEVENUE ?

So that chart 3 is able to display the bar.

Paul

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Paul,

I was checking your expression, please check the characters in bold and red:

sum({$<year = {"<=$(=max(year)) >=$(=max(year)-12)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} rEVENUE={rEVENUE}>}Amount/1000/$(Columndim89))

I just remove those characters (I also added single quotes to your rEVENUE value):

sum({$<year = {"<=$(=max(year)) >=$(=max(year)-12)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}, rEVENUE={'rEVENUE'}>}Amount/1000/$(Columndim89))

The chart displays the following information, but I'm not sure if this fills your needs:

foto.png

Regards,

-- Karla

View solution in original post

3 Replies
paulyeo11
Master
Master
Author

My QV Doc

Anonymous
Not applicable

Hi Paul,

I was checking your expression, please check the characters in bold and red:

sum({$<year = {"<=$(=max(year)) >=$(=max(year)-12)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} rEVENUE={rEVENUE}>}Amount/1000/$(Columndim89))

I just remove those characters (I also added single quotes to your rEVENUE value):

sum({$<year = {"<=$(=max(year)) >=$(=max(year)-12)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}, rEVENUE={'rEVENUE'}>}Amount/1000/$(Columndim89))

The chart displays the following information, but I'm not sure if this fills your needs:

foto.png

Regards,

-- Karla

paulyeo11
Master
Master
Author

Hi Karla

Thank you for your advise . I have test it does give the chart. But due to my dimension expression have some issue , i need to solve it .

Paul