Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
eagle__pedro
Contributor
Contributor

Pivot table dimensionality

Hi, 

I have a problem with calculating some dimensions.

I have four dimensions: WBS,job name, Task, Person.

I have the correct value for  sheduled hours in WBS, job name, Task, Person and i have the correct value for effective hours in WBS.


I have to calculate the effective hours on the other dimensions by calculating the percentage of hours planned first on each job name within the wbs and then for each task based on the previous calculation

example
 
 
eagle__pedro_1-1633446299603.png

To calculate the effictive hours i used this formula

if(dimensionality()=2,
sum(sheduled_hours)/sum(total(sheduled_hours))*(aggr(sum(total([effective_hours]))+),WBS)),
if(Dimensionality()=3,
sum(sheduled_hours)/sum(total(sheduled_hours))*(aggr(sum(total([effective_hours]))),WBS)),
if(Dimensionality()=4,
sum(sheduled_hours)/sum(total(sheduled_hours))*(aggr(sum(total([effective_hours]))),WBS)))
))

 

my problem is that according to the filter that is used the value of the effective hours varies because the value of the percentage of planned hours varies.
How can I always have the same data?

 
 
2 Replies
eagle__pedro
Contributor
Contributor
Author

sorry, i used


if(Dimensionality()=2, sum(sheduled_hours)/sum(Total(sheduled_hours)),
if(Dimensionality()=3, sum(sheduled_hours)/sum(Total(sheduled_hours)),
if(Dimensionality()=4, sum(sheduled_hours)/sum(Total(sheduled_hours)))))
*(sum(total([effective hours])))

SBN
Contributor III
Contributor III

Hi there,

Did you manage to solve this?
I have similar question in the following thread:
https://community.qlik.com/t5/App-Development/Qlik-Sense-Pivot-Table-Calculate-percentage-of-previou...

Kind regards,

SBN