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

PivotTable Diagram does not show dimension with value zero

Hi,

I'm relatively new to QlikView and need your help!

I have data that should be aggregated by a certain criteria (Therapieklasse).

Therapieklasse can have 11 expressions (A, B, C, D, E, F, G, H, K, L, M).

Please see table below that describes the data structure of the input data in a simple way.

Patienten-IDDatumTherapieklasse
11101.01.2021A
11101.01.2021B
22202.01.2021A
22202.01.2021C
33303.01.2021D
44403.01.2021E
44404.01.2021F
55504.01.2021H
55505.01.2021K
55505.01.2021L
66605.01.2021M
66605.01.2021B
77706.01.2021B

 

In the Diagram I want to display data like this:

TherapieklasseNumber of Patients with certain TherapieklasseNumber of Patients with certain Therapieklasse divided by number of all Patients (= 7 Patients) Benchmark
A228,57%30%
B342,86%50%
C114,29%20%
D114,29%20%
E114,29%15%
F114,29%20%
G00%5%
H114,29%10%
I114,29%5%
K114,29%20%
L114,29%25%
M114,29%15%

 

Benchmark data is connected by Therapieklasse and values do not change.

As you can see in my example data, there is no Patient with Therapieklasse G.

Unfortunately my pivot diagram does not show the "0" for Therapieklasse G and the Benchmark value of 5%. The line for Therapieklasse G (in the table above marked red) does not even exist.

How can I solve the problem, so that both Benchmark and Number of Patients with Therapieklasse G are shown even if there is no Patient with Therapieklasse G?

Thank you very much in advance!

Best regards, Stefanie

Labels (1)
1 Reply
stevejoyce
Specialist II
Specialist II

I do not see Therapieklasse G in the data model.  If you have a master list of possible Therapieklasse values, you can concatenate the missing values.  In some way you need to have a dimension that contains the list of dimension values to be displayed.

 

master_Therapieklasse:
load * inline [
master_Therapieklasse
A
B
C
D
E
F
G
H
I
J
]
;

data:
LOAD
*

FROM https://community.qlik.com/t5/QlikView-App-Dev/PivotTable-Diagram-does-not-show-dimension-with-value...

(html, utf8, embedded labels, table is @1)
;

concatenate (data)
load
master_Therapieklasse as Therapieklasse
resident master_Therapieklasse
where not exists (Therapieklasse, master_Therapieklasse);

drop table master_Therapieklasse;

exit script;