Qlik Community

Qlik Sense Cloud Discussions

jonnieyacoub
Contributor

Set analysis with IF function

Hey guys,

I'm trying to show the leads of different spaces in KPI buttons. But i want to exclude some values... I tried this but it did not work:

COUNT(IF({[wants_office_own_meters_max] < 40, DUAL ('0 - 40 M2', 1),

[source] -={'Via verhuurder'},

[date]={">=01/03/2017"}>}

[wants_office_own_meters_max]))

When i use this it works:

COUNT(IF([wants_office_own_meters_max] < 40, DUAL ('0 - 40 M2', 1)))


But i need to exclude some sources and start the count from date 1/03/2017...

1 Solution

Accepted Solutions
luismadriz
Valued Contributor

Re: Set analysis with IF function

Hi Jonnie,

What do you want to count if [wants_office_own_meters_max] >= 40?

Is it two KPI boxes?


it'll be great if you show sample data or data structure and expected outcome


One KPI could be

COUNT( {<[wants_office_own_meters_max] = {"<40"}>} [wants_office_own_meters_max])


The other:

COUNT( {<[wants_office_own_meters_max] = {">=40"}, [source] -={"Via verhuurder"}, [date]={">=01/03/2017"} >}  [wants_office_own_meters_max])

I hope this helps,

cheers,


Luis

2 Replies
luismadriz
Valued Contributor

Re: Set analysis with IF function

Hi Jonnie,

What do you want to count if [wants_office_own_meters_max] >= 40?

Is it two KPI boxes?


it'll be great if you show sample data or data structure and expected outcome


One KPI could be

COUNT( {<[wants_office_own_meters_max] = {"<40"}>} [wants_office_own_meters_max])


The other:

COUNT( {<[wants_office_own_meters_max] = {">=40"}, [source] -={"Via verhuurder"}, [date]={">=01/03/2017"} >}  [wants_office_own_meters_max])

I hope this helps,

cheers,


Luis

jonnieyacoub
Contributor

Re: Set analysis with IF function

Luis,

COUNT( {<[wants_office_own_meters_max] = {">=40"}, [source] -={"Via verhuurder"}, [date]={">=01/03/2017"}>} 

[wants_office_own_meters_max])


This is the correct answer. I did not know how to set the IF statement within set analysis.


Thank you

Community Browser