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: 
knightwriter
Creator III
Creator III

Count Distinct query

Hi All,

I have a query with two different expressions I am using. I am looking to show YTD 2015 completed activities and A) gives me circa 500 where B) gives me 5,000. I am failing to understand why there is such a huge difference in the outcomes and was wondering if anyone could shed some light on this? And possibly the correct one to use! Thank in advance.

A) =count(distinct(if(InYear([Activity.Completed Date], Today(), 0), [Activity Id], )))

B) =Count(Distinct If([Activity.Status]='Completed' AND [Activity.Completed Date],  Today(),[Activity Id],))

Labels (1)
0 Replies