Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to display the graph below to show 0 values but somehow it's not showing below. Can somone help me please. I enabled display 0 values in data handling and even included the date comparison dimension to include null values but it's not showing for the month of june, july and august where there are no sales.
Can someone help to explain what I'm missing?
Okay I found out why it does not work. I have a section access so I had to create a new reduction called reductiondate and add an 'ALL' function for the Date.
Hello,
You need to generate the master calendar to populate the dates and months to show those 0 sales values.
Thanks,
Ashutosh
Thanks for the link! Let me try this out and get back to you. Thank you so much
So I follow the script from the link and change it according to my tables. But I still have the same result. Where am I going wrong?
Script from master calendar:
QuartersMap:
MAPPING LOAD
rowno() as Month,
'Q' & Ceil (rowno()/3) as Quarter
AUTOGENERATE (12);
Temp:
Load
min("Date") as minDate,
max("Date") as maxDate
Resident i_fact_sales_agg;
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));
DROP Table Temp;
TempCalendar:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);
MasterCalendar:
Load
TempDate AS "Date",
week(TempDate) As Week,
Year(TempDate) As Year,
Month(TempDate) As Month,
Day(TempDate) As Day,
ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear,
WeekDay(TempDate) as WeekDay
Resident TempCalendar
Order By TempDate ASC;
Drop Table TempCalendar;
Data Model:
Okay I found out why it does not work. I have a section access so I had to create a new reduction called reductiondate and add an 'ALL' function for the Date.