Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

My chart have 7 Bar , How to make it only display first 6 bar ?

Hi All

I have below expression working fine :-

=If(Month_n >= 1 and Month_n <= 1, Dual('1 mth ago', 1),

If(Month_n >= 2 and Month_n <= 2, Dual('2 mth ago', 2),

If(Month_n >= 3 and Month_n <= 3, Dual('3 mth ago', 3),

If(Month_n >= 4 and Month_n <= 5, Dual('4 mth ago', 4),

If(Month_n >= 5 and Month_n <= 5, Dual('5 mth ago', 5),

If(Month_n >= 6 and Month_n <= 6, Dual('6 mth ago', 6), Dual('>7 mth ago', 7)))))))

It will display total 1 mth ago till >7 mth ago Bar.

and i like to remove the last Bar >7 mth ago , so i modify the above expression to below :-

=If(Month_n >= 1 and Month_n <= 1, Dual('1 mth ago', 1),

If(Month_n >= 2 and Month_n <= 2, Dual('2 mth ago', 2),

If(Month_n >= 3 and Month_n <= 3, Dual('3 mth ago', 3),

If(Month_n >= 4 and Month_n <= 5, Dual('4 mth ago', 4),

If(Month_n >= 5 and Month_n <= 5, Dual('5 mth ago', 5),

If(Month_n >= 6 and Month_n <= 6, Dual('6 mth ago', 6), ))))))

 

But it does not work. it only remove the label not the bar.

Can some one advise me.

Paul

1 Solution

Accepted Solutions
sunny_talwar

May be use this as your calculated dimension

=If(Month_n >= 1 and Month_n <= 1, Dual('1 mth ago', 1),

If(Month_n >= 2 and Month_n <= 2, Dual('2 mth ago', 2),

If(Month_n >= 3 and Month_n <= 3, Dual('3 mth ago', 3),

If(Month_n >= 4 and Month_n <= 5, Dual('4 mth ago', 4),

If(Month_n >= 5 and Month_n <= 5, Dual('5 mth ago', 5),

If(Month_n >= 6 and Month_n <= 6, Dual('6 mth ago', 6)))))))

And select 'Suppress When Value Is Null' on the dimension tab for the above calculated dimension

Capture.PNG

View solution in original post

3 Replies
paulyeo11
Master
Master
Author

my qvw

sunny_talwar

May be use this as your calculated dimension

=If(Month_n >= 1 and Month_n <= 1, Dual('1 mth ago', 1),

If(Month_n >= 2 and Month_n <= 2, Dual('2 mth ago', 2),

If(Month_n >= 3 and Month_n <= 3, Dual('3 mth ago', 3),

If(Month_n >= 4 and Month_n <= 5, Dual('4 mth ago', 4),

If(Month_n >= 5 and Month_n <= 5, Dual('5 mth ago', 5),

If(Month_n >= 6 and Month_n <= 6, Dual('6 mth ago', 6)))))))

And select 'Suppress When Value Is Null' on the dimension tab for the above calculated dimension

Capture.PNG

paulyeo11
Master
Master
Author

Hi Sunny

Appreciate your help a lot. it work fine.

Paul