Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mohan_1105
Contributor III

How to multiply a specific value with each branch in hierarchy data?

Greetings!!

I am dealing with hierarchy data, where I wanted to sum all the referral turnover and also the turnover of my referral's referral. Data has different levels, for instance, if I select the person from level 1 then his/her turnover is added up by his referral who is in next level i.e level2 (turnover) * 0.5 and level 3 by 0.3 and rest of the level by 0.2.

My actual data looks like,

Capture.JPG

Hierarchy data after importing into Qlik,

Captue.JPG

Here for example, If I select A HAREESH BASHA from Level2 then calculation should be like,

A HAREESH BASHA (TurnOver) + A HAREESH BASHA referral(TurnOver) *0.5 +A HAREESH BASHA referral's referral(TurnOver)*0.3

I have no idea how to achieve it. Please help. I have attached the QVF for your convenience

Tags (2)
1 Solution

Accepted Solutions
mohan_1105
Contributor III

Re: How to multiply a specific value with each branch in hierarchy data?

Using Ancestor key in hierarchy function, we can multiply the specific value with each branch.

3 Replies
vinieme12
Esteemed Contributor II

Re: How to multiply a specific value with each branch in hierarchy data?

Can you also post the excel?

mohan_1105
Contributor III

Re: How to multiply a specific value with each branch in hierarchy data?

Yeah, attached !!

mohan_1105
Contributor III

Re: How to multiply a specific value with each branch in hierarchy data?

Using Ancestor key in hierarchy function, we can multiply the specific value with each branch.