Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

neil_gabin
New Contributor III

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
neil_gabin
New Contributor III

Re: Same measure different result on KPI vs Pivot Table

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))

1 Reply
neil_gabin
New Contributor III

Re: Same measure different result on KPI vs Pivot Table

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))

Community Browser