Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

chrisweldon
New Contributor III

Heatmap - set analysis date question


I am trying to use a heatmap to show scores in different dimensions.

I am using an extension to have buttons set a variable to determine which line of business and which date to use (I don't want it affected by other selections).  It seems to work for the Line of Business, but not for date.  I currently get the most recent data whatever the date selection is.  Any ideas?

The expression I am using is:

Sum({1<[LoB]={$(=vBrokerSurveyLoB)},[Date]={'=$(=vBrokerSurveyDate)'}>}[Score])

New to set analysis - so I suspect it is a syntax issue.  It seems if I make the = for the Date into a <= it works okay and sums up the scores, but that is not what I want!

Many thanks in anticipation.

Chris

9 Replies

Re: Heatmap - set analysis date question

Is this a variable -> vBrokerSurveyDate

If it is, then how do you define this variable?

chrisweldon
New Contributor III

Re: Heatmap - set analysis date question

‌yes - it is a variable - set in the input variable extension I have added. So it uses for example 31/03/2014

Hope that helps.

Chris

Re: Heatmap - set analysis date question

How does a value like 31/03/2014 gets assigned to the variable???

and the goal is to calculate sum of square on a selected date??

MVP
MVP

Re: Heatmap - set analysis date question

You might need this:

Sum({1<[LoB]={$(=vBrokerSurveyLoB)},[Date]={"=$(='vBrokerSurveyDate)'"}>}[Score])


or this

Sum({1<[LoB]={$(=vBrokerSurveyLoB)},[Date]={"=$(=Date('vBrokerSurveyDate)')"}>}[Score])

MVP
MVP

Re: Heatmap - set analysis date question

t3.png

ogster1974
Honored Contributor II

Re: Heatmap - set analysis date question

if you are using qsVariable be careful with form input vales especially dates as there is no validation checks so the user could enter anything.

chrisweldon
New Contributor III

Re: Heatmap - set analysis date question

It is set as part of the extension.  I have currently set it as 31/12/2014.  Not sure if I need to add a date function around it?

Yes - I want to get the heatmap to show the data from just that date.

Chris

chrisweldon
New Contributor III

Re: Heatmap - set analysis date question

I am using the drop down box - so I have sent the date to the variable within the object.  Using 31/12/2014 or 31/03/2014 - I am presuming this is set as a date?

Cheers

Chris

chrisweldon
New Contributor III

Re: Heatmap - set analysis date question

Sorry for the delay - travelling with work!

Neether of these seem to work.

I have checked, and by inserting a "text" date 20140930 into the data, I can filter on that fine.  So it is something to do with the way you format Dates in Set Analysis.

Obviously a " or ' somewhere in the wrong place but I can't figure it out!

Cheers

Chris

Community Browser