Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
user467341
Creator II
Creator II

Showing months without data in bar chart?

I have this bar chart-

user467341_0-1689297549264.png

I created a master calendar and associate the date to the measure date and enable include all zero values.

However, this does not solve the problem where there is no data in a particular month (eg Dec-22). I thought linking up a master calendar will resolve this. I think I need to set a MIN/MAX somewhere?

Why is this not working? 

Labels (2)
5 Replies
cristianj23a
Partner - Creator III
Partner - Creator III

Hello, let's see if I understood correctly.
Do you want to show all months, even those with zero value?
For example, in the image you send I see the months oct2022, nov2022 and jan2023 and then it jumps to mar2023, feb2023 would be missing (Do you want to see that month but with a zero value?)

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
user467341
Creator II
Creator II
Author

That is correct. I want to see Feb 2023 with 0 (same for any other months without data).

cristianj23a
Partner - Creator III
Partner - Creator III

Look, I did a test.

Replaces with the master calendar date.

Here I attach the example, if it doesn't work you can send me your qliksense (qvf) file to review it.

cristianjmr_0-1689305527777.png

Regarts.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
user467341
Creator II
Creator II
Author

Hi I have a calendar similar to your calendario masetro. Is that your master calendar?

The way I link both my tables are using the date, instead of your Month-Year. I tried using Month-Year too but it doesnt appear somehow. FYI my measure is a daily measure, not a monthly.

What is "NumPer" in your table?

cristianj23a
Partner - Creator III
Partner - Creator III

Hello, the NumPer helps me to order the Month-Year periods in the graphs.

If your data is displayed on a daily basis, it is good that you relate it by Date, if not, I recommend you by Year-Month.

Now for what you are requesting to work for you, after relating the calendar master with your database, in the graphics you must use the fields of your master calendar (not your database), that way it will work for you .

Here I send you the code that I always use for the master calendar:


//[Calendario]:
LET vDateMin = Num(MakeDate(2021,1,1));   //Fecha de inicio de calendario
LET vDateMax = Num(Today());  //Fecha fin de calendario

[Calendario Temp]:
LOAD $(vDateMin) + RowNo() - 1 as [Num Fecha],
Date($(vDateMin) + RowNo() - 1) as Fecha
AUTOGENERATE 1
WHILE $(vDateMin) + IterNo() - 1<= $(vDateMax);

[Calendario Maestro]:
LOAD Date(Fecha,'DD/MM/YYYY') AS Fecha,
Year(Fecha) AS Año,
'S' & Ceil(Month(Fecha)/6) as Semestre,
'Q' & Ceil(Month(Fecha)/3) as Trimestre,
Month(Fecha) AS Mes,
WeekDay(Fecha) AS Semana,
Day(Fecha) AS Día,
WeekDay(Fecha)&'-'&Day(Fecha) AS PerSemana,
Num(Month(Fecha),'00') AS [Num Mes],
Month(Fecha)&'-'&Right(Year(Fecha),2) AS [Año Mes],
Year(Fecha)&Num(Month(Fecha),'00') AS [NumAñoMes]
Resident [Calendario Temp]
Order By Fecha Asc;
Drop Table [Calendario Temp];


If you have more doubts let me know.
Greetings.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.