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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to: graphical visualization of a pivot table?

Hello Qlikview community,

I have a special question concerning pivot tables an the graphical visualization of them.

I do have a dataset, which looks as follows:


fallnr | DRG_2010 | DRG_2011 | D_CW
fallnr1 | I21Z | I21Z | 0,300
fallnr2 | I21Z | I31Z | 0,500
fallnr3 | I13D | I13C | 0,200


When I put this data into a pivot table, I get something like this:

error loading image

As you can see, there ist for every DRG 2010 a record, which tells you, which DRG 2011 there is and how many of them.

Now I wanted to have that in a bar chart similar to a pivot chart in Excel. But what I get is this:

error loading image

The information from the pivot chart is fully transfered to the bar chart. But it shows additionally all DRG_2011 records, that have no correlation to DRG_2010. The pivot chart does not eliminate the values, that are zero or do not have a correlation.

I already tried to check and uncheck the "do not show NULL values" but that did not help.

What I wanted to have is something similar to a pivot chart in excel like this:

error loading image

As you can see, there are both dimensions shown in one axis and there are no records, which values are zero or null.

Do you have any suggestions, how to get this problem solved?

Thank you very much for any help,

Karsten

1 Solution

Accepted Solutions
Not applicable
Author

I would use a Calculated Dimension something along the lines of "=DRG_2011 & chr(10) & DRG_2010".

As a bonus, you could define the Background Color of the Expression as some RGB manipulation to group the DRG_2010 items together. I used =RGB(100*Mid(DRG_2010,2,1),mod(100*Mid(DRG_2010,3,1),255),mod(10*ord(Mid(DRG_2010,4,1)),255)) to group the I06 as blue, I09 as green, I10 as purple, etc.

View solution in original post

5 Replies
Not applicable
Author

Maybe you can add a new dimension (='' for exemple) in the bar chart.

But I'm not sure it improve your chart.

Check also "Suppress Value When Is Null" in the dimension properties.

Regards

jj

Not applicable
Author

I would use a Calculated Dimension something along the lines of "=DRG_2011 & chr(10) & DRG_2010".

As a bonus, you could define the Background Color of the Expression as some RGB manipulation to group the DRG_2010 items together. I used =RGB(100*Mid(DRG_2010,2,1),mod(100*Mid(DRG_2010,3,1),255),mod(10*ord(Mid(DRG_2010,4,1)),255)) to group the I06 as blue, I09 as green, I10 as purple, etc.

Anonymous
Not applicable
Author

Wow, that's awesome! Qou made my day!

Thank you very much!

The only thing, I did not get to work for me is the formula for the grouped colors. Which is a very good suggestion.

I put the formula into the formula field for the first color in the color tab of the diagram. Is this correct? I always get black as the resulting color. Do I have to set something else? Or am I completly wrong?

Your picture proofes, that it's possible.

Thank you in advance!

Karsten

Not applicable
Author

Hello Karsten,


jweber1travelers wrote: you could define the Background Color of the Expression



kbessner wrote:I put the formula into the formula field for the first color in the color tab of the diagram. Is this correct?


No, it is a good idea but it is the "Background Color of the Expression". For this try instead --> chart properties --> expression tab --> expand the according expression via [+] --> choose "bg color" and input the formula from the post above into the Definition-Field.

RR

Anonymous
Not applicable
Author

Oh yeah, that's it!

I never used it before. And I can see, that I still have much more to learn.

Thank you very much!

Kind regards,

Karsten