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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
__Ruta
Contributor II
Contributor II

Adding null values to bar chart and pivot table

Hi,

I'm having problem with null values representation on bar chart and pivot table. 

Load editor:

LOAD * INLINE
[Date, Quantity, Group
2024.10.20, 3, A
2024.10.21, 1, B
2024.10.23, 5, B
2024.10.25, 4, A
];

Datos:
LOAD * INLINE
[Date
2024.10.20
2024.10.21
2024.10.22
2024.10.23
2024.10.24
2024.10.25
];

For example, when I choose one of groups, I wanna see quantities during date period. So, if there is a day with zero quantity, i want to see that days too (in bar chart, in pivot). I already tried with adding SUM({1} 0) to measure, but then it shows all the dates, regardless of chosen dates interval.

As in example below, I want to see only outlined in red:

__Ruta_1-1729858622189.png

Thank you! 🙂

 

 

Labels (4)
1 Solution

Accepted Solutions
Kushal_Chawda

@__Ruta  try below

Sum(Quantity)+sum({1<Date={">=$(=date(min(Date)))<=$(=date(max(Date)))"}>}0)

Screenshot 2024-10-25 at 14.43.00.png

View solution in original post

3 Replies
Kushal_Chawda

@__Ruta  try below

Sum(Quantity)+sum({1<Date={">=$(=date(min(Date)))<=$(=date(max(Date)))"}>}0)

Screenshot 2024-10-25 at 14.43.00.png

__Ruta
Contributor II
Contributor II
Author

Thank you! 

 

I tried, and it's working for this period, that I asked and because min and max dates have values, but for example if I wanna see quantities from 2024.10.21 to 2024.10.25 ( so, there will be two last days with zero quantity), is it possible?

Kushal_Chawda

@__Ruta  It is dynamic. It should work. Did you try? On 2024.10.25 you have quantity value present, so how it will be zero? See the results as per  your data example

Screenshot 2024-10-28 at 09.25.20.png