Forum Discussion
twitchingdog
6 years agoNew Member
Power BI Query: Identify Parent record with qualifying Child records
Hi All - Looking for some assistance with Query or filter Issue: I have a child TABLE A with a Direct relationship to PROJECT table. I want to filter TABLE A to ONLY show projects that have NO ch...
artemus
6 years agoMicrosoft Employee
let
Source = <Your Data>,
#"Grouped Rows" = Table.Group(Source, {"SourceNamespace"}, {{"Rows", each _, Value.Type(Source)}}),
Custom1 = Table.SelectRows(#"Grouped Rows", each Table.SelectRows([Rows], each [ID} <> null){0}? = null),
#"Removed Columns" = Table.RemoveColumns(Custom1,{"ID"}),
Custom2 = if Table.RowCount(#"Removed Columns") = 0 then Table.RemoveRows(Source, 0) else Table.ExpandTableColumn(#"Removed Columns", "Rows", Table.ColumnNames(#"Removed Columns"[Rows]{0}))
in
Custom2
Not sure what this has to do with a direct relationship though
- twitchingdog6 years agoNew Member
thanks for info, I will try this out.
I mention the ProjectID, because ultimately thatis what will join to my Project table to limit the # of child records reported on. ID is just the main table GUID, which is not necessary. It only was showing the respective table structure