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

Help me out

The requirement is...if Count of TW is >0 the product column should be TW, if count of  TW and FM > 0 then product column should be TW/FM, in the same way if Count of all TW FM HL and CL > 0, then product column should be TW/FM/HL/CL

 

Please help me out as its urgent an requirement..

TW   Farm   Farm Digital   HL   CL    
Count Value in CR Count Value in CR Count Value in CR Count Value in CR Count Value in CR Product
                    FM
                    TW/FM
                    TW/FM/HL
                    TW/HL
3 Replies
Rohan
Specialist
Specialist

Hi,

At what level are you taking the count ? Use Aggr() with that field & your if() statements in the reverse order where you check from TW/FM/HL first then to the lower levels..

Annapurna1
Contributor III
Contributor III
Author

This has to be used in straight table

 

Rohan
Specialist
Specialist

Hi,

That's not an issue. Use something like :

if(Aggr(count(TW)*count(FM)*count(HL)*count(CL),Fields used in the straight table)>1,'TW/FM/HL/CL',

if(Aggr(count(TW)*count(FM),Fields used in the straight table)>1,'TW/FM',

if(Aggr(count(TW),Fields used in the straight table)>1,'TW')))