Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download 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