Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

bar chart

Hi all,

I have a question in bar chart,in my bar chart i taken a month is a dimension(x-axis) with 2 expressions(2 bars).1st expresion(1 bar) is sum(value) for max(year).2nd expresion(2nd bar)  is sum(value) for max(year)-1.please find the attacment.

The bar cahrt showing correctly, but i want to eliminate the prev year bars where the month values is null in current year.i wnat to show the bar chart like this

If again the values will be uploaded in sept month and so on the prev year bars of months will appear.

Can anyone have solution for this.please help me.

regards,

baru

1 Solution

Accepted Solutions
whiteline
Master II
Master II

Use this as dimension:

=aggr(if(sum({$<year ={$(=Max(year))}>}value)<>0, month), month)

View solution in original post

11 Replies
whiteline
Master II
Master II

Use this as dimension:

=aggr(if(sum({$<year ={$(=Max(year))}>}value)<>0, month), month)

Not applicable
Author

Hi whiteline,

Thanks for the solution,it is showing correctly.

I have 1 more question,how can we represent legend(2011 Budget,2011 Actual) like in the following image,

regards,

baru

whiteline
Master II
Master II

Sorry, can't see the image.

Append it as an attachment.

I guess you want to parametrize expression labels like this:

     =Max(year) & ' Budget'

instead of 'prev year'

and

     =Max(year) & ' Actual'

instead of 'cur.year'

Not applicable
Author

Hi whiteline,

no i am not asking about the legent captions.i want represent legend as horizontal position in my chart.Like..

regards,

baru

whiteline
Master II
Master II

The same problem with images.

Could you attach them as files ?

Not applicable
Author

Hi Baru,

Under the axes tab, we can change our legend position through "Dimension Axis" part.

Regards,

Kabilan K.

Not applicable
Author

legend in horizontal.JPG

Hi whiteline,

i am sorry for inconvenience.please see the above image with red mark.I want legend in horizontal view in chart.above one is the example.

regards,

baru

whiteline
Master II
Master II

Select this chart (click on caption).

Press and hold Ctrl+Shift (you should see red rectangles).

Move the legend rectangle with the mouse.

Not applicable
Author

Can u give a clear picture?

Regards,

Kabilan