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
March 11, 2PM EST: Do More with Qlik - Getting Started wtih Qlik Sense SaaS - Redux. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mistnh001
Contributor II
Contributor II

qlik sense set analysis

ตัวอย่าง count( distinct If( Year= [PAT_INFO.YFirstDate] ,[PAT_INFO.HN])) 

สามารถทำให้เป็นรูปแบบ set analysis ได้หรือไม่ครับ 

1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

Hi Mistnh,

Try this:

Count({<[PAT_INFO.HN]={"=Year=[PAT_INFO.YFirstDate]"}>}[PAT_INFO.HN])

or

Count({<Year={"=Year=[PAT_INFO.YFirstDate]"}>}[PAT_INFO.HN])

or 

count(if(Year=[PAT_INFO.YFirstDate],[PAT_INFO.HN]))

You can also try creating a flag in your table if both Year and [PAT_INFO.YFirstDate] is in same table

In script:

Load *,

if(Year=[PAT_INFO.YFirstDate],1,0)  as Flag

from <>;

 

Then in front end: Count({<Flag={1}>}[PAT_INFO.HN])

Best Regards,
KC

View solution in original post

2 Replies
jyothish8807
Master II
Master II

Hi Mistnh,

Try this:

Count({<[PAT_INFO.HN]={"=Year=[PAT_INFO.YFirstDate]"}>}[PAT_INFO.HN])

or

Count({<Year={"=Year=[PAT_INFO.YFirstDate]"}>}[PAT_INFO.HN])

or 

count(if(Year=[PAT_INFO.YFirstDate],[PAT_INFO.HN]))

You can also try creating a flag in your table if both Year and [PAT_INFO.YFirstDate] is in same table

In script:

Load *,

if(Year=[PAT_INFO.YFirstDate],1,0)  as Flag

from <>;

 

Then in front end: Count({<Flag={1}>}[PAT_INFO.HN])

Best Regards,
KC

View solution in original post

mistnh001
Contributor II
Contributor II

thank you very muck