Forum Discussion
Parent-Child Hierarchy Filtering Conditions
Hi Allison, thanks for your quick reply!
Point 1 (linking that to the Child table using ID to ParentID) is done.
Point 2 (would typically need to do this as an OR) I need here here also an AND condition to filter exatly for the right items - otherwise it would show me also the wrong parent items.
Can you show me an example of the formula for point 2 please?
Try something like this, as a MEASURE:
Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos.
I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query.
- Anonymous6 years agoNot applicable
Hi Allison,
I transferred your suggestion to the real table as below but it says as error "Too many arguments were passed to the FILTER function. The maximum argument count for the function is 2." What does this mean?
TEST = IF(ISBLANK(MAXX(FILTER('Project Tracker';'Project Tracker'[Title]="Apple" && 'Project Tracker'[State]="Done");'Project Tracker'[Parent Work Item Id]));"A";IF(MAXX(FILTER('Project Tracker';'Project Tracker'[Title]= "Apple" && [State]="Done");[Parent Work Item Id])=MAXX(FILTER('Project Tracker';[Title]= "Pear"&& [State]="To Do";[Parent Work Item Id]); "YES"; "NO")))- AllisonKennedy6 years ago
Community Champion
Anonymous That means you have a syntax error, you need to close the FILTER function with )
Try adding the red ) as below and delete the final 😞
TEST = IF(ISBLANK(MAXX(FILTER('Project Tracker';'Project Tracker'[Title]="Apple" && 'Project Tracker'[State]="Done");'Project Tracker'[Parent Work Item Id]));"A";IF(MAXX(FILTER('Project Tracker';'Project Tracker'[Title]= "Apple" && [State]="Done");[Parent Work Item Id])=MAXX(FILTER('Project Tracker';[Title]= "Pear"&& [State]="To Do");[Parent Work Item Id]); "YES"; "NO"))
Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos.
I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query.
- Anonymous6 years agoNot applicable
AllisonKennedy The formula works now, thanks!
But as result it shows in the new "TEST" column in all cells the red "A" from the formula below - do you think we missed here something else?
TEST = IF(ISBLANK(MAXX(FILTER('Project Tracker';'Project Tracker'[Title]="Apple" && 'Project Tracker'[State]="Done");'Project Tracker'[Parent Work Item Id]));"A";IF(MAXX(FILTER('Project Tracker';'Project Tracker'[Title]= "Apple" && [State]="Done");[Parent Work Item Id])=MAXX(FILTER('Project Tracker';[Title]= "Pear"&& [State]="To Do");[Parent Work Item Id]); "YES"; "NO"))