Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In a bar chart i have to select data from 2 feilds namely year and month. but if i select year 2019 and month december (this search doesnt have any value), the chart will show the value for all decmeber cases in theprevious months. How to avoid this?
Hi, maybe there is no row with year 2019 and month dec, if you select 2019 and december has a grey background that means that there is no relation between those fields values, so Qlik removes one (or many) selections to allow you to select month december.
Maybe cerating a maester calendar so at least there is a relation between 2019 and december, one.
Here is one way of doing it:
Calendar:
LOAD
IdDate as IdDate,
Date(IdDate) as Date,
Month(IdDate) as Month,
Year(IdDate) as Year
;
LOAD
AddMonths(MinDate, IterNo()-1) as IdDate
While AddMonths(MinDate, IterNo()-1) <= MaxDate
;
LOAD
YearStart(Min(FieldValue('IdDate', RecNo()))) as MinDate,
Floor(YearEnd(Max(FieldValue('IdDate', RecNo())))) as MaxDate
AutoGenerate FieldValueCount('IdDate')
;
// change IdDate to your current date field, you can create one using "Makedate(YearField, MonthField) as IdDate"
It didn't went correctly.. 😞