Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to display missing ranges in bin

Hello,

Any idea's how I can force QV to also show ranges in a bin for which there are no data to display?

LOAD * INLINE [

    ID, RefDuty

    1, 11

    2, 19

    3, 31

    4, 32

    5, 41

];

Straight table:

Used Dimensions > Add calculated Dimension --> class(RefDuty, 10)

Expressions > Definition --> NumericCount (RefDuty)

Output:

class(RefDuty, 10)     NumericCount (RefDuty)

10 <= x < 20               2

30 <= x < 40               2

40 <= x < 50               1

Expected behavior:

10 <= x < 20     2

20 <= x < 30     0

30 <= x < 40     2

40 <= x < 50     1

Thanks

Peter

1 Solution

Accepted Solutions
MarcoWedel

Hi,

another solution:

QlikCommunity_Thread_131460_Pic1.JPG.jpg

QlikCommunity_Thread_131460_Pic2.JPG.jpg

QlikCommunity_Thread_131460_Pic3.JPG.jpg

QlikCommunity_Thread_131460_Pic4.JPG.jpg

hope this helps

regards

Marco

View solution in original post

2 Replies
MK_QSL
MVP
MVP

Load

  *,

  IF(RefDuty >= 10 and RefDuty < 20, '10 <= x < 20',

  IF(RefDuty >= 20 and RefDuty < 30, '20 <= x < 30',

  IF(RefDuty >= 30 and RefDuty < 40, '30 <= x < 40',

  IF(RefDuty >= 40 and RefDuty < 50, '40 <= x < 50')))) as Class

Inline

[

  ID, RefDuty

    1, 11

    2, 19

    3, 31

    4, 32

    5, 41

];

Load * Inline

[

  Range, Class

  10 <= x < 20,10 <= x < 20

  20 <= x < 30,20 <= x < 30

  30 <= x < 40,30 <= x < 40

  40 <= x < 50,40 <= x < 50

];

Now create a straight table...

Dimension

Class


Expression

NumericCount (RefDuty)

Go to Presentation tab and untick Suppress Zero Values

MarcoWedel

Hi,

another solution:

QlikCommunity_Thread_131460_Pic1.JPG.jpg

QlikCommunity_Thread_131460_Pic2.JPG.jpg

QlikCommunity_Thread_131460_Pic3.JPG.jpg

QlikCommunity_Thread_131460_Pic4.JPG.jpg

hope this helps

regards

Marco