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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
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],))

0 Replies