Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator II
Creator II

Using Bar chart

Hi Community,

I Need Some help...........

I have a one field in that i have one If condition(Executed, Non Executed, Lapsed)

In my BAR chart i want to show different colors in Single bar...

Suppose XYZ this is my field in that i have conditions..........(Executed=Red, Non Executed=Blue and Lapsed=Orange)

figure2.PNG.png

5 Replies
Anonymous
Not applicable

You probably want to split this into three expressions and then create a stacked bar chart. In each expression use set analysis to target just the data you want e.g.

Sum({Status={'Executed'}>} Measure)

Sum({Status={'Non Executed'}>} Measure)

Sum({Status={'Lapsed'}>} Measure)

paulwalker
Creator II
Creator II
Author

Hi Adam,

That is my dimension field

suppose XYZ my dimension field

and Sum(sales) Expression

Anonymous
Not applicable

Hi Paul,

There are two approaches. Either the set analysis above or using two dimensions. However you decide to split up the Executed/Non Executed/Lapsed you will ultimately get down to creating a stacked bar chart. The set analysis route gives you more control over the colours and the two dimensions route is quicker and easier.

If you can let me know the three field names then I can maybe create some more useful examples for you.

paulwalker
Creator II
Creator II
Author

Here small Example

xyz

0

0

0

1

1

1

-

-

-

Here 0--->Non Executed

1-----> Executed

-(null)-----> Lapsed

Like a below Image

figure2.PNG.png

Anonymous
Not applicable

OK, if you only want a single bar in your chart then you can cheat and use a calculated dimension, such as

='xyz'

Then your expressions can be whatever you need to define your three sections, so probably set analysis

Count({<xyz={'0'}>} xyz)

or with an if statement

Sum(If(xyz='0',1,0))