Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ?
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
Assuming your data model is as below; then you just need to enable "IncludeZero Values" under "Add-On's" in chart propterties
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
];