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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sspawar88
Creator II
Creator II

Set analysis.

Hi,

i'm working on expression in which i will

count all temperature which is less than -1 for XY branch_type /

Count of all temperature for XY branch_type

is below set analysis is correct?


Count({$<param_name={'Temperature'},param_value={'<=-1'},branch_type={'XY'}>}param_value)/

Count(total{$<param_name={'Temperature'},branch_type={'XY'}>}param_value)

BUT i can have multiple branch_types.

so how can i have only one formulae for all branch_types?

8 Replies
Anonymous
Not applicable

Just remove

branch_type={'XY'}

from your expressions.

Anonymous
Not applicable

what do you want to achieve?

why don't you use branch_type as Dimension and you would not Need to provide it in Expression?

or do you only want some branches? do you have a listbox then to seletc the branches?

provide us with more infos

Not applicable

remove branch_type from expression and add it as a dimension.

er_mohit
Master II
Master II

Hi

As per mentioned for all branch type try this

Count({$<param_name={'Temperature'},param_value={'<=-1'}>}param_value)/

Count(total{$<param_name={'Temperature'}>}param_value)

jagan
Partner - Champion III
Partner - Champion III

Hi Satish,


Try like this


Count({$<param_name={'Temperature'},param_value={'<=-1'}>}param_value)/

Count(total <branch_type>{$<param_name={'Temperature'}>}param_value)


Regards,

Jagan.



sspawar88
Creator II
Creator II
Author

Actually when i put following expression in simple bar chart it gives correct result.


Count({$<param_name={'Temperature'},param_value={'<=-1'}>}param_value)/

Count(total{$<param_name={'Temperature'}>}param_value)*100


But i want stack chart for some temperature ranges suppose

-1 to -10

-10.1 to -13.9

-14 to -17.9

-18 and below

for this i used following calculated dimension

if(param_name='Temperature' and (param_value)<='-1' and (param_value)>= '-10', 'Red',

if(param_name='Temperature' and (param_value)<= '-10.1' and (param_value)>='-13.9', 'Yellow',

if(param_name='Temperature' and (param_value)<= '-14' and (param_value)>='-17.9', 'Amber',

if(param_name='Temperature' and (param_value)<= '-18', 'Green'))

))



but in stack bar chart it showing value 400%.


whats wrong in my expression or input?



sspawar88
Creator II
Creator II
Author

Actually when i put following expression in simple bar chart it gives correct result.


Count({$<param_name={'Temperature'},param_value={'<=-1'}>}param_value)/

Count(total{$<param_name={'Temperature'}>}param_value)*100


But i want stack chart for some temperature ranges suppose

-1 to -10

-10.1 to -13.9

-14 to -17.9

-18 and below

for this i used following calculated dimension

if(param_name='Temperature' and (param_value)<='-1' and (param_value)>= '-10', 'Red',

if(param_name='Temperature' and (param_value)<= '-10.1' and (param_value)>='-13.9', 'Yellow',

if(param_name='Temperature' and (param_value)<= '-14' and (param_value)>='-17.9', 'Amber',

if(param_name='Temperature' and (param_value)<= '-18', 'Green'))

))



but in stack bar chart it showing value 400%.


whats wrong in my expression or input?


Anonymous
Not applicable

Since it is a different question, it will be appropriate to open a separate thread for it.