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: 
Not applicable

Help selecting data

Hi everyone,

I need some help on the best way of selecting data. We are currently showing houses by price but would like to be able to select certain ranges E.g. 0-100k, 101-150k etc. What would be the best way to go about this?

I have tried putting together a slider (using Discrete values seems to select a range) but the data in the graph it is selecting doesn't seem to be correct and in the 'Current Selections' box it only says 'House price' values '60 of 100' which isn't very useful for a user rather than saying the range they have selected. This may not be the best way so i'm definitely open to suggestions!

Please help!!

Thanks

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Hi,

Try the attached.

Hope it helps,

Jason

EDIT:  Instead of my IF statement in the dimension, Miguel's set analysis would probably be more efficient

Sum({< Price = {'>=$(vRangeFrom)<=$(vRangeTo)'} >} Price)

Message was edited by: Jason Michaelides

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hi Louise,

Depending on your data model, assuming you don't have already the classification in your script, you can create two variables and use them in the slider object, say vRangeFrom and vRangeTo. Then use both values in the expressions of the charts, so for example, in a new pivot table with PropertyID as dimension, and the following as expression:

Sum({< Price = {'>=$(vRangeFrom)<=$(vRangeTo)'} >} Price)

Will show all those PropertyID value where the price is in the given range.

Another (likely faster) option is to create the field in the script, using a conditional:

Properties:

LOAD *,

     If(Price < 150000, '<150K',

       If(Price < 250000, '<250K',

         '>250K')) AS PriceClassification

FROM File.qvd (qvd);

Hope that helps.

Miguel

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Hi,

Try the attached.

Hope it helps,

Jason

EDIT:  Instead of my IF statement in the dimension, Miguel's set analysis would probably be more efficient

Sum({< Price = {'>=$(vRangeFrom)<=$(vRangeTo)'} >} Price)

Message was edited by: Jason Michaelides