Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Problem when filtering calculated dimensions qlik sense

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.

2 Replies
Gysbert_Wassenaar

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)


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

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

  • I want the set analysis to calculate
    • Today's KPI_VALUE for DATUM_ID=20181031
    • Yesterday's KPI_VALUE for DATUM_ID=20181030.
  • I don't want the model for the KPI to change, or it would always give me 0 for yesterday's function. My problem is that Qlik is still considering the Day field even when I ignore it in the formula here:
    • Sum({<DATUM_ID={$(=Max(DATUM_ID-1))}, Date, Year, Month, Day>} KPI_VALUE).

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.