Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this bar chart-
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?
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?)
That is correct. I want to see Feb 2023 with 0 (same for any other months without data).
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.
Regarts.
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?
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.