Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I think I have found a very weird behavior in Qlik Sense. I have just finished loading a set of variables from an excel file, and everything was working wonders until I try to apply a filter for the field "Day". Instead of the field "Day", I'm using a master dimension with the formula =$(dDay_Field) which contains "Dual('Day ' & Day, Day)", and it works in all the charts as expected without filters.
The issue comes when I try to filter by day a chart that is comparing today vs yesterday. I'm ignoring the day dimension and calculating everything in the set analysis, but I believe that Qlik doesn't recognize my dimension as day, and it doesn't ignore it, giving me the value for today for every day that I select.
The formulas are the following:
Master Dimension
Field: =$(dDay_Field)
Name: Day
dDay_Field = Dual('Day ' & Day, Day)
Chart formula
Sum({<DATUM_ID={$(=Max(DATUM_ID))}, Date, Year, Month, Day>}KPI_VALUE)
-
Sum({<DATUM_ID={$(=Max(DATUM_ID-1))}, Date, Year, Month, Day>}KPI_VALUE)
Does someone see a possible solution for this problem? Is there a special syntax for calculated dimensions?
Thanks,
Pedro.
Edited to clarify the issue.
You're not ignoring the date fields in the Max function. Try:
Sum({<DATUM_ID={$(=Max({<Date, Year, Month, Day>}DATUM_ID))}, Date, Year, Month, Day>}KPI_VALUE)
-
Sum({<DATUM_ID={$(=Max({<Date, Year, Month, Day>}DATUM_ID-1))}, Date, Year, Month, Day>}KPI_VALUE)
Hi gwassenaar,
Thanks for the answer . That is the thing, I'm not ignoring the date fields in the Max function because I want the set analysis to be sensitive to date changes, but not the model for the KPI.
For example, if I select Date 2018-10-31
The question would be: Is there a way to ignore a calculated dimension in a formula when using a master dimension? Is there any special syntax to ignore the calculated dimension?
Best regards,
Pedro.