Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Same measure different result on KPI vs Pivot Table

The same measure (Active Work Days) produces a different result when used on the KPI object compared to the Pivot Table object

The numbers in the Pivot table are correct at all levels of the hierarchy (Region, Role and Worker) but the number in the KPI object is showing the value at the lowest level only. I need it to reflect the value for the selected Region, Role or Worker and also for the Month/s or Week/s that are selected.

2017-11-04_111711.jpg

This is the definition of the KPI object

2017-11-04_112313.jpg

This is the definition of the Pivot Table object.

2017-11-04_112356.jpg

Here are the definitions of the measure and the variable it depends on

MEASURE: Active Work Days

2017-11-04_112824.jpg

VARIABLE: vActiveWorkDaysInPeriod

Number of workdays (excluding weekends) in the selected period, less any days where a worker started or ended with us in the selected period. Uses the WeekStart() and MonthStart() functions so that it counts the number of days in the week or month regardless of whether a worker has logged time for those days or not.

2017-11-04_112901.jpg

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I was going to delete this post becausae I managed to solve this problem thanks in part to stalwar1‌ who offered a solution to another question I posted.

Aggregate values instead recalculate up a hierarchy

But I thought I'd leave it here in case another "newbie" like myself had a similar problem.

I change the measure from...

sum($(vActiveWorkDaysInPeriod))

to...

sum(Aggr($(vActiveWorkDaysInPeriod), Region, Role, Worker))

View solution in original post

1 Reply
Anonymous
Not applicable
Author

I was going to delete this post becausae I managed to solve this problem thanks in part to stalwar1‌ who offered a solution to another question I posted.

Aggregate values instead recalculate up a hierarchy

But I thought I'd leave it here in case another "newbie" like myself had a similar problem.

I change the measure from...

sum($(vActiveWorkDaysInPeriod))

to...

sum(Aggr($(vActiveWorkDaysInPeriod), Region, Role, Worker))