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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
venkat1
Creator II
Creator II

Set analysis in if statement

Hi ,

My stement is like this

if( og.VC_CATEGORY= 'GOLD','GOLD',
if( og.VC_CATEGORY= 'DIAMOND','DIAMOND'))

for the above statement i need to write the set analsis ,where the set value is "og.vc_purity=24"

og.vc_purity =24 should write in og.vc_category='GOLD'.

 

Please help how to write this .

6 Replies
felipedl
Partner - Specialist III
Partner - Specialist III

Hi, just make a expression like:
sum({<og.vc_purity={24},og.vc_category={"GOLD"}>}Value)
venkat1
Creator II
Creator II
Author

HI 

 

if(sum({<og.vc_purity={24},og.VC_CATEGORY= {"GOLD"}>}'GOLD',
if( og.VC_CATEGORY= 'DIAMOND','DIAMOND',
if( og.VC_CATEGORY= 'PLATINUM','PLATINUM')))) 

 

i tried like that,it was not working 

Anil_Babu_Samineni

I think this is what you are expecting?

if(Only{<og.vc_purity ={24}>} og.VC_CATEGORY)= 'GOLD','GOLD',
if(Only({<og.vc_purity ={24}>} og.VC_CATEGORY)= 'DIAMOND','DIAMOND'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
venkat1
Creator II
Creator II
Author

Hi 

Its not working 

 

Anil_Babu_Samineni

Where you are trying this? What is the expected result.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
venkat1
Creator II
Creator II
Author

i was using in the dimensions for the pivot table.