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

Create Dimension with zero value if not present

Hi All,

I have a requirement to create a Heat Map like below where one dimension having value :  A,B,C and other dimension : 1,2,3 and 4.

Based on some calculation, I got the values as 2,3 and 4 but there is no value for 1 (see image 1).

So, I want to display 1 also here, with value 0 like in Image 2.

PS: On un-checking "Suppress When value is NULL", it is showing ' - ' in dim1 and dim2 both.

Pls help.

Capture.PNG

Capture1.PNG

Regards,

Anjali Gupta

1 Solution

Accepted Solutions
Not applicable
Author

Hi Thomas,

Thanks for the response. But it didn't worked.

Instead I did inline load as below :

Dimension:

LOAD * INLINE [

    Dimension

    1A

    2A

    3A

    4A

    1B

    2B

    3B

    4B

    1C

    2C

    3C

    4C

];

Dimension1:

LOAD

Mid(Dimension,1,1) as DIM2,

Mid(Dimension,2,1) as DIM1

Resident Dimension;

DROP Table Dimension;

And this worked for me.

Regards,

Anjali Gupta

View solution in original post

2 Replies
thomaslg_wq
Creator III
Creator III

You may need to play with these parameters (see screenshots) :

Sshot1.pngSshot2.png

Not applicable
Author

Hi Thomas,

Thanks for the response. But it didn't worked.

Instead I did inline load as below :

Dimension:

LOAD * INLINE [

    Dimension

    1A

    2A

    3A

    4A

    1B

    2B

    3B

    4B

    1C

    2C

    3C

    4C

];

Dimension1:

LOAD

Mid(Dimension,1,1) as DIM2,

Mid(Dimension,2,1) as DIM1

Resident Dimension;

DROP Table Dimension;

And this worked for me.

Regards,

Anjali Gupta