Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

sagarjagga
Contributor

Alternate of P() function

Hi All,

IDParent IDAmount
1a100
2b200
3a300
4c400

 

Above is my Data set. My requirement is like , if i select the ID = 1 in filter , then i need to display the data for the parent ID coming under 1. Below should be my resultant table. 

Parent IDSum(Amount)
a400

 

I can achieve this my using P() function and Getfilterselection function but by default Getfilterselection will return null.

 

Any suggestions what could be the alternative of this.

Labels (1)
1 Solution

Accepted Solutions

Re: Alternate of P() function

What exactly did you try? Did you try like this?

Sum({<ID, [Parent ID] = P([Parent ID])>} Amount)

View solution in original post

4 Replies

Re: Alternate of P() function

What exactly did you try? Did you try like this?

Sum({<ID, [Parent ID] = P([Parent ID])>} Amount)

View solution in original post

sagarjagga
Contributor

Re: Alternate of P() function

i was using set expression like , Sum({<ID, [Parent ID] = P({<ID={"$(=Getfilerselection(ID))"}>}[Parent ID])>} Amount)
sugathirajkumar
Contributor

Re: Alternate of P() function

Sum({<ID, [ParentID] = P([ParentID])>} total Amount)

Re: Alternate of P() function

Make sense, I think [Parent ID] = P([Parent ID]) is the way to go here