Search code examples
qliksense

QlikSense: Incomplete visualizations


I'm hoping to get an explanation of why this behaves this way. I've recently implemented a variable and it works brilliantly, but I've just discovered that upon initial opening of the report, it shows incomplete visualizations. Strangely, as soon as I change the the option in my parameter, it switches back to normal operation, even if I go back to the parameter option that it was initially sitting on.

Upon opening report:

enter image description here

And as soon as I change the option (from PDT to CDT, for example) the data populates. It remains populated, and correctly changes if I go back to PDT even:

enter image description here

So to get specific, this parameter changes the StartDate and EndDate timestamps in the results above. This is the expression behind the StartDate:

=if(Month(Today())=Month(Pick($(TimeZone), Start_PDT, Start_MDT, Start_CDT, Start_EDT)), Date(Pick($(TimeZone), Start_PDT, Start_MDT, Start_CDT, Start_EDT), 'YYYY-MM-DD hh:mm:ss[.fff] TT'))

And the EndDate:

=Date(Pick($(TimeZone), End_PDT, End_MDT, End_CDT, End_EDT), 'YYYY-MM-DD hh:mm:ss[.fff] TT')

EDIT: Here is an example of the error seen for the StartDate column. Of course, this error disappears once you start changing the parameter option:

enter image description here


Solution

  • You just need to make sure your variable has a preset definition, which you can set in the Variables dialog box:

    Screenshot of Qlik Sense variables dialog box