# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
cancel
Showing results for
Did you mean:
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.

This is the definition of the KPI object

This is the definition of the Pivot Table object.

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

MEASURE: Active Work Days

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.

1 Solution

Accepted Solutions
Contributor III
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))

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