Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i would like to create a bar chart with three different bar with these expressions:
sum(x)
sum(y)
sum(z)
and with type i want to stacked with A and B
if i add the type field to dimension the qlikview will stack the expressions to one bar. So i dont know how to set the chart.
Can somebody help me?
You can see a data in the attachment and also a picture of what i would like to do
The two types of data came from two different system. I just concatenate in the load script. So i can change it if i have to for his chart.
Thanks for your answer in advance
Marci !
Hi,
one front end solution could be:
The already proposed data model change however seems the cleaner approach, given it makes sense to combine X, Y, Z into a common value field and a separate name field to distinguish their origin.
A short way to do so would be a Crosstable load.
hope this helps
regards
Marco
You can try this:
Test:
NoConcatenate
LOAD week,
[2week],
type,
Y as Amount,
'Y' as Flag
FROM
[data.xlsx]
(ooxml, embedded labels, table is Munka1);
Concatenate
LOAD week,
[2week],
type,
X as Amount,
'X' as Flag
FROM
[data.xlsx]
(ooxml, embedded labels, table is Munka1);
Concatenate
LOAD week,
[2week],
type,
Z as Amount,
'Z' as Flag
FROM
[data.xlsx]
(ooxml, embedded labels, table is Munka1);
Concatenate
LOAD week,
[2week],
type,
paid as Amount,
'paid' as Flag
FROM
[data.xlsx]
(ooxml, embedded labels, table is Munka1);
Basically transposing the data.
Then use 2week, Flag and type as dimensions.
And,
sum({<Flag = {"X", "Y", "Z"}>} Amount) --> as your expression.
Hi,
one front end solution could be:
The already proposed data model change however seems the cleaner approach, given it makes sense to combine X, Y, Z into a common value field and a separate name field to distinguish their origin.
A short way to do so would be a Crosstable load.
hope this helps
regards
Marco
Thank you Guys!
All sollution is good. My fault, but i forgot to write one thing. I would like to put the "paid" to a linechart to this barchart. The paid dimension will be on the right side. Like in excel with secondary dimension.
With your sollution, there is only one expression and if i add the new one for the paid the grouping and stacking didnt work. Could you help me this problem?
I don't think we can directly achieve that - meaning stacked, grouped bars and lines in the same chart.
One way is to super-impose another chart on top of the current object, and make the top object transparent.
However, this has many limitations - hovering only works on the top chart, and axis sizing and object docking should be manually adjusted to align with each other.
Glad it worked.
Please close your thread if your initial question is answered:
Qlik Community Tip: Marking Replies as Correct or Helpful
thanks
regards
Marco
Oh i see.
Thank your answer!
Hi Marco,
I have a similar requirement, and so far, your solution is closest to what I need.
There are some key differences, which I struggle to implement though:
1. I only need X and Y
2. X and Y have 4 and 5 distinct attribute values (which I want to stack in the two separate bars X and Y)
3. I do not have the type dimension. Instead, I want to stack the different values of X and Y.
In the end, I want my bar chart to look exactly like yours, except that I have two bars for each date, and instead of type A and B, I will have 4 colors stacked in bar X, and 5 colors stacked in bar Y.
I would greatly appreciate any help.
Thanks in advance!
Sincerely,
Peter
Is this type of visual possible in Qlik Sense as well? Currently, as per my understanding, Qlik Sense doesn't accept more than two dimensions in a bar chart to make it grouped and stacked simultaneously. Is there a way around for this in Qlik Sense too?