Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis problem

Hello everybody, I've a problem with the set analysis: I want to calculate a valor in a graph but it will be between two degrees of a temperature (as an interval) who are in two variables. I've try this :
avg
({$ <temperatura ={">=$(=vchoixtemperaturamin) <=$(=vchoixtemperaturamax)"}>}[moyvalore])
Thank you for your help
Have a nice day
1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

Then the following should work:

Avg({< temperatura ={">=$(vchoixtemperaturamin)<=$(vchoixtemperaturamax)"} >} [moyvalore])

Hope that helps.

Miguel

View solution in original post

6 Replies
Miguel_Angel_Baeyens

Hi,

Syntax seems to be fine. But if that is not working, my guess is that is something likely to do with formats. What do the variables "vchoixtemperaturamin" and "vchoixtemperaturamax" store? How did you create those variables: from the Settings menu or within the script? What is the format of field "temperatura"?

Hope that helps.

Miguel

Not applicable
Author

Try

avg

({$ <temperatura ={">=$(=vchoixtemperaturamin)"}, temperature="{ <=$(=vchoixtemperaturamax)"}>}[moyvalore])

Not applicable
Author

Hello Miguel,

The variables "vchoixtemperaturamin" and "vchoixtemperaturamax" are create from the Settings menu and represente degrees (who are integer and could be positif or negatif). For example "vchoixtemperaturamin"=-20 and "vchoixtemperaturamax"=10 so I want to have on the graph the degrees who are between -20° and 10°.

And the format of temperatura is an integer positive or negative

Thank you

Miguel_Angel_Baeyens

Hi,

Then the following should work:

Avg({< temperatura ={">=$(vchoixtemperaturamin)<=$(vchoixtemperaturamax)"} >} [moyvalore])

Hope that helps.

Miguel

Not applicable
Author

And avg({$temperatura={">=$(=vchoixtemperaturamin)"},temperatura={"<=$(=vchoixtemperaturamax)"}>}moyvalor) doesn't work!

Not applicable
Author

Thanks a lot Miguel, it works!!!!!

Have a nice day