Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
amanjain57
Creator II
Creator II

Multiple levels from one level

Hello

I have a case where a project has hours accounted for it. 

Example

Project Hours
ABC1000

 

I want to distibute these hours by different phases by different percentages like below.  So the 1000 hours will be allocated based on these percentage to different phases. 

Phase% allocation
PR116.05%
PR27.80%
PR310.13%
PR411.14%
PR510.11%
PR625.38%
PR710.88%
PR88.32%

 

Can some one help to understand how can i model this in Qlik?

 

Thanks

Aman

Labels (3)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

If you have more than one project you will need to identify the project per phase row. See attached qvf

image.png

image.png

View solution in original post

4 Replies
Vegar
MVP
MVP

If you have more than one project you will need to identify the project per phase row. See attached qvf

image.png

image.png

dplr-rn
Partner - Master III
Partner - Master III

2 options

1- link your project table with the phase one similar to below and do calculation on the front end

load * inline [
Project,Hours
ABC,1000
];
load * inline [
Project,Phase,% allocation
ABC,PR1,	16.05%
ABC,PR2,	7.80%
ABC,PR3,	10.13%
ABC,PR4,	11.14%
ABC,PR5,	10.11%
ABC,PR6,	25.38%
ABC,PR7,	10.88%
ABC,PR8,	8.32%
];

2 - join the 2 tables. then do another resident load to split the values based on the 2 columns

e.g.

ProjectTemp:
load * inline [
Project,Hours
ABC,1000
];
Outer join (ProjectTemp)
load * inline [
Project,Phase,% allocation
ABC,PR1,	16.05%
ABC,PR2,	7.80%
ABC,PR3,	10.13%
ABC,PR4,	11.14%
ABC,PR5,	10.11%
ABC,PR6,	25.38%
ABC,PR7,	10.88%
ABC,PR8,	8.32%
];

Project:
load *,
	[% allocation] * Hours as PhaseHours
resident ProjectTemp;
drop table ProjectTemp;
dplr-rn
Partner - Master III
Partner - Master III

#1 is what vegar is suggesting
Channa
Specialist III
Specialist III

you need to add projects to Phases table you can't join with out it

Channa