Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

Logic help

Hi,

Can any one please help me on below requirement.

I have a table like below. Here requirement is need  to keep only TS flag wherever the Country has both TS and PS.

I can't made any change on Backend. Could you please provide the UI solution.

Qliksense UI Table:

Country                Flag

India                         TS    

India                         PS

US                              TS

UK                              TS

UK                              PS

Argentina                 PS

etc.....

Expected Output:

Country                Flag

India                         TS    

US                              TS

UK                              TS

Argentina                 PS

Thanks in advance

 

 

 

1 Solution

Accepted Solutions
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

Try this 

if(ISNUll(WildMatch(Flag,'PS')+WildMatch(Flag,'TS')),'TS','PS')

or

@srdheekonda  suggestion you can use that also but use the distinct flag in that formula because if the flag is repeated it will give wrong output

IF(AGGR(COUNT(Distinct Flag),Country)=2,'TS','PS')

Hope this helps

Thanks

Thanks and Regards
Kashyap.R

View solution in original post

5 Replies
srdheekonda
Contributor III
Contributor III

I think creating a measure with following formula solve your requirement : IF(AGGR(COUNT(FLAG),COUNTRY)=2,'TS','PS')

Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

Try this 

if(ISNUll(WildMatch(Flag,'PS')+WildMatch(Flag,'TS')),'TS','PS')

or

@srdheekonda  suggestion you can use that also but use the distinct flag in that formula because if the flag is repeated it will give wrong output

IF(AGGR(COUNT(Distinct Flag),Country)=2,'TS','PS')

Hope this helps

Thanks

Thanks and Regards
Kashyap.R
srdheekonda
Contributor III
Contributor III

kashyap , thanks for your correction,

 

mahitham
Creator II
Creator II
Author

Hi @Kashyap_R and @srdheekonda 

Thanks for your help. The below logic is working fine but client want to filter the flag with TS or PS value. By adding in measure not able to filter.

Is there any way to move to backend. Could you please help me on this. The wild match expression is not working for me to put in backend.

IF(AGGR(COUNT(Distinct Flag),Country)=2,'TS',Flag)

 

Thanks in advance.

 

 

 

Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

Try this as Dimension and rename it in front end

aggr(if(ISNUll(WildMatch(Flag,'PS')+WildMatch(Flag,'TS')),'TS','PS'),Country)

Hope this helps

Thanks

Thanks and Regards
Kashyap.R