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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
RKULKARNI4
Contributor III
Contributor III

Where condition

Hello team,

I need to apply these condition Count(Number) > =5  in where clause for the final result .How it can be done.please let me know

 

Regards

Rk

2 Replies
JordyWegman
Partner - Master
Partner - Master

Hi,

You can try this with an preceding load:

Table:
Load
   Name,
   Number
Where Number >= 5;
Load
   Name,
   Count(Number) as Number
From {YourSource} (qvd)
Group by Name;

Jordy

Climber

Work smarter, not harder
Chanty4u
MVP
MVP

hi,

small sample.

Data:

LOAD * INLINE [

    Company, Sector, CorporateGroup, Year, DataX, DataY, DataZ, DataA

    A, Financials, Group1, 2010, 1, 3, 1, 9

    A, Financials, Group1, 2011, 9, 9, 1, 2

    A, Financials, Group1, 2012, 1, 2, 3, 5

    B, Financials, Group2, 2010, 2, 3, 1, 7

    B, Financials, Group2, 2011, 2, 77, 1,3

    B, Financials, Group2, 2012, 2, 3, 4, 8

    C, Automotive, Group1, 2010, 4, 5, 10, 2

    C, Automotive, Group1, 2011, 2, 6, 18, 2

    C, Automotive, Group1, 2012, 3, 5, 10, 1

    D, Automotive, Group3, 2010, 4, 5, 10, 2

    D, Automotive, Group3, 2011, 2, 6, 18, 2

    D, Automotive, Group3, 2012, 3, 5, 10, 1 

];

 

Right Join (Data)

LOAD CorporateGroup

Where Flag = 1;

LOAD CorporateGroup,

  If(Count(CorporateGroup) > 3, 1, 0)  as Flag

Resident Data

Group By CorporateGroup;