Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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
mistnh001
Contributor II
Contributor II
Author

thank you very muck