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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
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
Partner - Specialist
Partner - 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
Partner - Specialist
Partner - 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')))