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: 
New-here1
Contributor III
Contributor III

If Match Statement

Hello,

I am looking to get a total value of courses completed on time in a KPI chart.. 

To get this, I think I need a IF MATCH statement.

Basically, if the (course end date) matches the (course estimated end date) then I would then want the number to show in the KPI so the code will go in the KPI chart

Hope this makes some sense

Thank you 

Labels (1)
1 Solution

Accepted Solutions
Digvijay_Singh
MVP
MVP

I think the better way is to create an indicator in the script like below - 

If([Course End Date] = [Course Estimated end date] = 1,0)   AS [On Time Indicator]

and then in the chart, you can do something like this - 

Count({<[On Time Indicator] = {1}>} [Course ID])

Just an idea, your data model might need a tweak to make it work

View solution in original post

3 Replies
Digvijay_Singh
MVP
MVP

I think the better way is to create an indicator in the script like below - 

If([Course End Date] = [Course Estimated end date] = 1,0)   AS [On Time Indicator]

and then in the chart, you can do something like this - 

Count({<[On Time Indicator] = {1}>} [Course ID])

Just an idea, your data model might need a tweak to make it work

BrunPierre
Partner - Master II
Partner - Master II

Try

=Count({$<RecordID={"=EndDate =EstimatedEndDate"}>}DISTINCT CourseID)

RecordID is unique for each row in the table

New-here1
Contributor III
Contributor III
Author

This worked! Thank you 🙂