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

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
sunny_talwar

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
sunny_talwar

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

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

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

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

sunny_talwar

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