Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
cedfoning
Creator
Creator

data for one particular year

Hello,
I have an issue.

I have a source table, which has data for the year 2021 (the column year in the source table contains only 2021).

source:

 
ANNEE ALIM SOLDE
2021 -6,5 0
2021 -2 4
2021 0000 0
2021 0000 0,5
2021 0000 1
2021 0000 1,5
2021 0000 2
2021 0000 2,5

 

The source data is connected to a table calendar (the column year in the table calendar contains 2019, 2020, 2021, 2020).

Calendar:

Year

2019, 2020, 2021, 2022

This means that, there will be no result if i select the year 2019 or 2020.

Actually, if i do sum(Alim), i'll have -8.5 for the year 2021 and no data for the other years.

The business wants, when filtring on 2019, 2020 and 2022 there should 0.

 

Any help please ?

@marcus_sommer 

 

 

Labels (3)
2 Replies
marcus_sommer

There is often no easy solution because with "normal" data-models data which doesn't exists couldn't be displayed - independent from the used tool. Of course there are ways possible to bypass this behaviour but they will have their price ... How much depends on the kind and size of the data-model and the complete requirements of the business.

In some cases it might be sufficient just to disable the hide NULL/ZERO options within the object and/or trying to enforce any results, like: rangesum(sum(Field), 0) but it's not seldom that missing data needs to be populated (depending on the granularity huge amounts of data might be needed).

IMO it's rather seldom that a NULL analysis has a real added value because the most user are already overwhelmed with the existing data and not be capable to comprehend them in regard to the missing ones. Therefore, it needs to be well balanced if it's sensible to implement such logic or not.

- Marcus

vinieme12
Champion III
Champion III

Assuming your  data model is as below; then you just need to enable    "IncludeZero Values"   under "Add-On's"  in chart propterties

vinieme12_0-1665991891462.png

 

Data:
load * inline [
ANNEE,ALIM,SOLDE
2021,-6,5,0
2021,-2,4
2021,0000,0
2021,0000,0,5
2021,0000,1
2021,0000,1,5
2021,0000,2
2021,0000,2,5
];

Calendar:
load * Inline [
ANNEE
2019
2020
2021
2022
];

 

 

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