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

How to color by expression a multi dimension bar graph?

Hello,

I haven't found the way to do in Qlik Sense what is shown in the picture below. Can you please help on how to color by expression using a different dimension than the ones in the graph for a bar chart?

Thanks in advance

Qlik.png

5 Replies
Ivan_Bozov
Luminary
Luminary

prestrepo
Contributor
Contributor
Author

Hello,

Thank you for your answer.

I must admit I did not find how to set the expressions regarding the colors when setting the Master Measures.

Should this be something like a conditional expression or an if based on the TAG dimension for the condition?

Can you please elaborate?

Thank you in advance

Ivan_Bozov
Luminary
Luminary

prestrepo
Contributor
Contributor
Author

Hello,

Thank you for the time you take on this.

Sorry but I still do not manage. Let me give sample data:

 

Product QuarterBudgetSpentTag
A1340B
B12330B
C1450B
A2340B
B2560B
C2450B
A3340B
B3230B
C3450B
A4560B
B4670B
C4560B
A1034S
B10233S
C1045S
A2034S
B2056S
C2045S
A3033F
B3021F
C3046F
A4055F
B4068F
C4056F

I woul like to plot in a Bar Graph:

X axis: Product

In a grouped Bar Chart, I'd like to see Sum(Budget) and Sum(Spent) and I would like to use the Tag column to define the colors: one for B, one for S and one for F.

Can you please help me implement this?

Btw, I am using Qlik Sense Enterprise

Thank you in advance

Ivan_Bozov
Luminary
Luminary

I see what you mean, but I don't think you can do this. The reason is that you want to have a bar chart with two dimensions - Product displayed on the x-axis and Tag to control the stacks and their color - and two measures - Sum(Budget) and Sum(Spent). However, a bar chart allows you to use one of the following scenarios:

1 dimension + 1 measure

2 dimensions + 1 measure

1 dimension + up to 15 measures

You can either create two separate charts, or the best that comes to my mind that will allow you to keep things in one graph is to use an alternative measure:

Dimension 1: Product

Dimension 2: Tag (create this as master item and assign the colors you want)

Measure 1: Sum(Budget)

Alternative measure: Sum(Spent)

vizmind.eu