Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
sunny_talwar

Is this a variable -> vBrokerSurveyDate

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

Anonymous
Not applicable
Author

‌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

sunny_talwar

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??

jonathandienst
Partner - Champion III
Partner - Champion III

You might need this:

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


or this

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

t3.png

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
ogster1974
Partner - Master II
Partner - Master II

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.

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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