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

Show all rows in dimension

Hi,

I've got a dimension and a measure.  The table is only showing the rows where I have numbers.  I want to show where I got nulls too.

Table

Dim,measure

A, 10

C, 5

 

How I want it

 

Dim,Measure 

A,10

B,

C,5

 

THANKS

 

Labels (3)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

The problem is where you are sourcing the dimension from

In such scenario  you should be sourcing dimensions from a separate dimension table which has all possible dimension values, like below.

facttable:
Load * Inline [
dimkey,dim2,measure
A,A,10
C,C,5
];

 


dimensiontable:
Load * Inline [
dimkey,dim
A,A
B,B
C,C
];
exit Script;

 

Now create a chart with dim from dimensiontable; sum(measure) and check Include Zero Values

 

Do not use key fields used to associate tables as dimensions in your chart

 

both tables have Include zero values checked, but as you can see dim sourced from a separate dimensiontable will show 0 when there is no associated data 

OutputOutput

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

4 Replies
vchuprina
Specialist
Specialist

Hi,

In Qlikview on presentation tab deselect 'Supress Zero-values' check box.

vchuprina_1-1650403178931.png

Result:

vchuprina_0-1650403126407.png

In Qliksense select "Include zero values" checkbox in Add-ons tab

vchuprina_2-1650403435092.png

Regards,

Vitalii

 

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
D19PAL
Creator II
Creator II
Author

But first I'll need to convert nulls to 0?

 

 

 

 

vinieme12
Champion III
Champion III

The problem is where you are sourcing the dimension from

In such scenario  you should be sourcing dimensions from a separate dimension table which has all possible dimension values, like below.

facttable:
Load * Inline [
dimkey,dim2,measure
A,A,10
C,C,5
];

 


dimensiontable:
Load * Inline [
dimkey,dim
A,A
B,B
C,C
];
exit Script;

 

Now create a chart with dim from dimensiontable; sum(measure) and check Include Zero Values

 

Do not use key fields used to associate tables as dimensions in your chart

 

both tables have Include zero values checked, but as you can see dim sourced from a separate dimensiontable will show 0 when there is no associated data 

OutputOutput

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

@D19PAL kindly close the thread by accepting a response as solution

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.