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

Counting MTD misses

count.PNG

Having some trouble think this one through.

Trying to count the number of days where Processed_Dash is less than Daily_Target_Dash

I would assume something like this

=Count({$<Processed_Dash < Daily_Target_Dash}, Month = {"$(=Month(Today()))"}, Year = {"$(=Year(Today()))"}>} distinct Date_Dash)

1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be create in script like below

If(Processed_Dash < Daily_Target_Dash, 1,0) as Flag

and expression is

Count({<Flag = {'1'}, Month = {'$(=Month(Today()))'}, Year = {'$(=Year(Today()))'}>} DISTINCT Date_Dash)


Or, One ugly expression this? But, I don't consider it is use

Count({<Processed_Dash = {"=Processed_Dash < Daily_Target_Dash"}, Month = {'$(=Month(Today()))'}, Year = {'$(=Year(Today()))'}>} DISTINCT Date_Dash)

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

View solution in original post

2 Replies
Anil_Babu_Samineni

May be create in script like below

If(Processed_Dash < Daily_Target_Dash, 1,0) as Flag

and expression is

Count({<Flag = {'1'}, Month = {'$(=Month(Today()))'}, Year = {'$(=Year(Today()))'}>} DISTINCT Date_Dash)


Or, One ugly expression this? But, I don't consider it is use

Count({<Processed_Dash = {"=Processed_Dash < Daily_Target_Dash"}, Month = {'$(=Month(Today()))'}, Year = {'$(=Year(Today()))'}>} DISTINCT Date_Dash)

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
sinanozdemir
Specialist III
Specialist III

Hi,

One solution could be Count(Distinct If(Processed_Dash < Daily_Target_Dash, Date_Dash)). Although, this may affect the calculation time depending on the number of records you have in your data model.


Thanks