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: 
IAMSIVA
Partner - Contributor II
Partner - Contributor II

Individual and set analysis condition value not matching

Hi All,

Please help me with the below expression for my calculation.

Expression works if i use the below logic: (individual dates) and the value is 2875

Count(distinct {<[Date] = {"10/25/2019"},Flag={'NEW'}>}id)
+
Count(distinct {<[Date] = {"11/1/2019"},Flag={'NEW'}>}id)
+
Count(distinct {<[Date] = {"11/8/2019"},Flag={'NEW'}>}id)
+
Count(distinct {<[Date] = {"11/15/2019"},Flag={'NEW'}>}id)
+
Count(distinct {<[Date] = {"10/25/2019"},Flag={'REPEAT'}>}id)
+
Count(distinct {<[Date] = {"11/1/2019"},Flag={'REPEAT'}>}id)
+
Count(distinct {<[Date] = {"11/8/2019"},Flag={'REPEAT'}>}id)
+
Count(distinct {<[Date] = {"11/15/2019"},Flag={'REPEAT'}>}id)

 

And has difference in value if i use the below logic: and the value is 2481

Count(distinct {<[Date] = {">=10/25/2019<=11/15/2019"},Flag={'NEW'}>}id)

+

Count(distinct {<[Date] = {">=10/25/2019<=11/15/2019"},Flag={'REPEAT'}>}id)

 

and the date format is MM/DD/YYYY and the correct value is 2875 and not 2481.

can you correct me if there is any issue with the > and < condition.

Labels (1)
3 Replies
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Try this:

sum(aggr(Count(distinct {<[Date] = {">=10/25/2019<=11/15/2019"},Flag={'NEW'}>}id),Date))

+

sum(aggr(Count(distinct {<[Date] = {">=10/25/2019<=11/15/2019"},Flag={'REPEAT'}>}id),Date))

Kushal_Chawda
MVP
MVP

Try this

Count(distinct {<[Date] = {">=10/25/2019<=11/15/2019"},Flag={'NEW','REPEAT'}>}id)

 

 

Anil_Babu_Samineni
MVP
MVP

Perhaps this

Count(distinct {<[Date] = {"10/25/2019", "11/1/2019", "11/8/2019", "11/15/2019"},Flag={'NEW', 'REPEAT'}>}id)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful