Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Md_Irfan
Contributor
Contributor

Ultimate Parent Status \ Top in Hierarchy Status \ Status for Category by Sub category

Hi All,

I need to find the status for the Parent ID considering all child ID. If any of of the Child is in Open status then parent Status should be Open else closed. And count of the total Open Parents. Below is the sample data. 

Parent Child Depth ChildStatus ParentStatus
1 1 1 Open  
2 2A 3 Closed Closed
2 2B 3 Closed Closed
2 2C 3 Closed Closed
3 3A 2 Closed Open
3 3B 2 Open Open
4 4 1 Closed  
5 5A 4 Closed Open
5 5B 4 Open Open
5 5C 4 Closed Open
5 5D 4 Open Open

 

The count of open parent will 2 as only Parent 3 and 5 have the Open status.

CountOfOpen Parent
2

 

Thank You,
Md Irfan

Labels (1)
1 Reply
hic
Former Employee
Former Employee

Try

Count({<ChildStatus={Open}>} distinct Parent)