Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
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
Partner

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
Champion III
Champion III

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;