Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
rajany089
Contributor III
Contributor III

Incorrect Sum and Average Calculation for "Days Past Due Date" in Qlik Sense

Hello Qlik Community,

I am facing an issue with the calculation of "Days Past Due Date" in Qlik Sense. I have used the following formula to calculate it:

 

IF(
Date(Floor([Request_Closed_At])) <= Date(Floor([Effective_SLA_Date])),
0,
IF(
Date(Floor([Request_Closed_At])) > Date(Floor([Effective_SLA_Date])),
Floor([Request_Closed_At] - [Effective_SLA_Date]),
0
)
) AS [Days Past Due Date]

I am able to get values, but when I filter on May 2024, the sum and average are not matching my manual calculations. For example, when manually calculating for May 2024:

  • Sum of Days Past Due Date = 157
  • Total number of incidents = 190
  • Expected Average = 0.81

However, in Qlik Sense, the sum and average displayed are different from my manual calculations. I’ve double-checked the data and calculation logic, but I can't pinpoint what’s causing this discrepancy. I’ve attached a screenshot that shows the issue.

Can someone please help me understand why this is happening and how I can fix it? It’s becoming quite frustrating, and any assistance would be highly appreciated.

Thanks in advance!

@Qrishna 

Labels (2)
1 Reply
Qrishna
Master
Master

Please provide the  sample data that you are working on.