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: 
aarav021
Contributor III
Contributor III

Is there a way to use pick and match for the below KPI expression

If(GetSelectedCount(MONTH)=0 and GetSelectedCount(QUARTER)=1,

if(GetSelectedCount(Hospital_NAME)=0,

 

Also is there a way we can use to define these expression in load editor and use pick and match in the KPI Expression. 

Please help me regarding this !

5 Replies
vinieme12
Champion III
Champion III

 

1) Using Match /Wildmatch you would compare values in One field only

2) this expression is not checking any field values but just verifying selections! is there more to ?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
aarav021
Contributor III
Contributor III
Author

If(GetSelectedCount(MONTH)=0 and GetSelectedCount(QUARTER)=1,

if(GetSelectedCount(Hospital_NAME)=0,

((count({<Hospital_NAME={'xyz'}>}Hospital_NAME)/
count({1}if(QUARTER_NAME=QuarterName(QuarterName(QUARTER_NAME)-1) and Hospital_NAME='xyz',Hospital_NAME))) -1)
,
((count(Hospital_NAME)/
count({1}if(QUARTER_NAME=QuarterName(QuarterName(QUARTER_NAME)-1),Hospital_NAME))) -1)

)

)

This is full expression I want to use pick and match or wildmatch to increase performance.. Is it possible in this expression ? 

vinieme12
Champion III
Champion III

you can look at optimizing the below expression by using set analysis instead of if()

count({1}if(QUARTER_NAME=QuarterName(QuarterName(QUARTER_NAME)-1) and Hospital_NAME='xyz',Hospital_NAME))) -1)

to below

count({1<

QUARTER_NAME ={'$(=QuarterName(QuarterName(QUARTER_NAME)-1))'}

,Hospital_NAME={'xyz' }

>}  Hospital_NAME )

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
aarav021
Contributor III
Contributor III
Author

Its giving syntax error. Will there be {1} or just 1 ?

 

vinieme12
Champion III
Champion III

can you post a snapshot of the edit expression window ; so i can see exactly what's causing the error

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.