Thank you for your help again @anon29275264 .
I wound up doing the extra steps needed in PowerQuery.
After using these Bodies of the API Call to capture those BoardRelationValues:
firstPage = Text.ToBinary("{""query"": ""query { boards(ids: " & BoardNbr_SalesPipeline & ") { items_page (limit: 100) { cursor, items { id, name, updated_at, group { title }, column_values { column { title }, text, ... on BoardRelationValue { display_value }} } } } }""}"),
nextPage = Text.ToBinary("{""query"": ""query { next_items_page (limit: 100, cursor: \""" & continuationCursor & "\"") { cursor, items { id, name, updated_at, group { title }, column_values { column { title }, text, ... on BoardRelationValue { display_value }} } } }""}"),
I then finish with some extra steps that expand the Columns, run a conditional column to bring forward when it finds a “display_value” and then group it all back up to proceed forward as it did before the expand those groupings into actual Columns in PowerQuery.
let
Source = List.Numbers(1,1),
#“Converted to Table” = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#“First Page” = Table.TransformColumnTypes(Table.RenameColumns(#“Converted to Table”,{{“Column1”, “FirstPage”}}),{{“FirstPage”, Int64.Type}}),
#“Invoked Custom Function” = Table.AddColumn(#“First Page”, “SalesPipelineApiResults”, each GetSalesPipelineCursorPagination2([FirstPage], null, null)),
#“Expanded ListToRows” = Table.ExpandListColumn(#“Invoked Custom Function”, “SalesPipelineApiResults”),
#“Expanded RecordsToColumns” = Table.ExpandRecordColumn(#“Expanded ListToRows”, “SalesPipelineApiResults”, {“id”, “name”, “updated_at”, “group”, “column_values”}, {“ItemId”, “Title”, “UpdatedAt”, “Group”, “Columns”}),
#“Expand Columns to Records” = Table.ExpandListColumn(#“Expanded RecordsToColumns”, “Columns”),
#“Expand Text Values” = Table.ExpandRecordColumn(#“Expand Columns to Records”, “Columns”, {“column”, “display_value”, “text”}, {“column”, “display_value”, “text.original”}),
#“Added Conditional Column” = Table.AddColumn(#“Expand Text Values”, “text”, each if [display_value] <> null then [display_value] else [text.original]),
#“Added Custom” = Table.AddColumn(#“Added Conditional Column”, “columns”, each Record.SelectFields([[column],[text]],{“column”,“text”})),
#“Removed Columns” = Table.SelectColumns(#“Added Custom”,{“ItemId”, “Title”, “UpdatedAt”, “Group”, “columns”}),
#“Grouped Rows” = Table.Group(#“Removed Columns”, {“ItemId”, “Title”, “UpdatedAt”, “Group”}, {{“Columns”, each _[columns] }}),
#“Expanding RecordsAndList” = Table.FromRecords(Table.TransformRows(#“Grouped Rows”, each
List.Accumulate([Columns], [
ItemId = [ItemId],
Title = [Title],
UpdateDate = [UpdatedAt],
Group = [Group][title]
], (state, current) => Record.AddField(state, current[column][title], current[text]) )
)),
#“Changed column type” = Table.TransformColumnTypes(#“Expanding RecordsAndList”, {{“Title”, type text}, {“UpdateDate”, type datetime}, {“Group”, type text}, {“Subitems”, type text}, {“Email”, type text}, {“Phone”, Int64.Type}, {“Territory”, type text}, {“CES”, type text}, {“Address”, type text}, {“Funder”, type text}, {“Status”, type text}, {“Caregiver Type”, type text}, {“Intake Complete”, type text}, {“Date of Intake”, type date}, {“Caregiver Name”, type text}, {“Caregiver Phone”, Int64.Type}, {“Hourly Cost”, type text}, {“Hours per week”, Int64.Type}, {“Payrate”, type number}, {“Deal Size”, type text}, {“Deal Age”, type text}, {“Days to Close”, type text}, {“Reason Lost”, type text}, {“Referral Source”, type text}, {“Supports Coordinator”, type text}, {“Quarter”, type text}, {“Referral Date”, type text}, {“First Shift”, type text}, {“Month of First Shift”, type text}, {“Zip Code”, type text}, {“Link to Events”, type text}, {“Follow Up Date”, type text}}),
#“Replaced value” = Table.ReplaceValue(#“Changed column type”, “,”, “”, Replacer.ReplaceText, {“CES”}),
#“Trimmed text” = Table.TransformColumns(#“Replaced value”, {{“CES”, each Text.Trim(), type text}}),
#“Renamed columns (REMOVE SOON)” = Table.RenameColumns(#“Trimmed text”, {{“Referral Date”, “Start Date”}}),
#“Replaced value 1” = Table.ReplaceValue(#“Renamed columns (REMOVE SOON)”, null, 0, Replacer.ReplaceValue, {“Hours per week”}),
#“Replaced value 2” = Table.ReplaceValue(#“Replaced value 1”, “,”, " ", Replacer.ReplaceText, {“Referral Source”}),
#“Trimmed text 1” = Table.TransformColumns(#“Replaced value 2”, {{“Referral Source”, each Text.Trim(), type text}}),
#“Split Column by Delimiter” = Table.SplitColumn(#“Trimmed text 1”, “Email”, Splitter.SplitTextByEachDelimiter({" - “}, QuoteStyle.Csv, false), {“Email”, “Email.duplicateValue”}),
#“Trimmed Text” = Table.TransformColumns(#“Split Column by Delimiter”,{{“Email”, Text.Trim, type text}}),
#“Removed Other Columns” = Table.SelectColumns(#“Trimmed Text”,{“Title”, “UpdateDate”, “Group”, “Subitems”, “Email”, “Phone”, “CES”, “Territory”, “Address”, “Zip Code”, “Funder”, “Status”, “Caregiver Type”, “Intake Complete”, “Date of Intake”, “Caregiver Name”, “Payrate”, “Caregiver Phone”, “Hourly Cost”, “Hours per week”, “Deal Size”, “Deal Age”, “Days to Close”, “Reason Lost”, “Referral Source”, “Supports Coordinator”, “Quarter”, “Start Date”, “First Shift”, “Month of First Shift”}),
#“Transform columns” = Table.TransformColumnTypes(#“Removed Other Columns”, {{“Title”, type text}, {“UpdateDate”, type text}, {“Group”, type text}, {“Subitems”, type text}, {“Email”, type text}, {“Phone”, type text}, {“Territory”, type text}, {“CES”, type text}, {“Address”, type text}, {“Funder”, type text}, {“Status”, type text}, {“Caregiver Type”, type text}, {“Intake Complete”, type text}, {“Date of Intake”, type text}, {“Caregiver Name”, type text}, {“Payrate”, type text}, {“Caregiver Phone”, type text}, {“Hourly Cost”, type text}, {“Hours per week”, type text}, {“Deal Size”, type text}, {“Deal Age”, type text}, {“Days to Close”, type text}, {“Reason Lost”, type text}, {“Referral Source”, type text}, {“Supports Coordinator”, type text}, {“Quarter”, type text}, {“Start Date”, type text}, {“First Shift”, type text}, {“Month of First Shift”, type text}}),
#“Replace errors” = Table.ReplaceErrorValues(#“Transform columns”, {{“Title”, null}, {“UpdateDate”, null}, {“Group”, null}, {“Subitems”, null}, {“Email”, null}, {“Phone”, null}, {“Territory”, null}, {“CES”, null}, {“Address”, null}, {“Funder”, null}, {“Status”, null}, {“Caregiver Type”, null}, {“Intake Complete”, null}, {“Date of Intake”, null}, {“Caregiver Name”, null}, {“Payrate”, null}, {“Caregiver Phone”, null}, {“Hourly Cost”, null}, {“Hours per week”, null}, {“Deal Size”, null}, {“Deal Age”, null}, {“Days to Close”, null}, {“Reason Lost”, null}, {“Referral Source”, null}, {“Supports Coordinator”, null}, {“Quarter”, null}, {“Start Date”, null}, {“First Shift”, null}, {“Month of First Shift”, null}, {“Zip Code”, null}}),
#“Replaced Value 3” = Table.ReplaceValue(#“Replace errors”,null,”",Replacer.ReplaceValue,{“Subitems”, “Phone”, “Date of Intake”, “Payrate”, “Caregiver Phone”, “Reason Lost”, “Referral Source”, “Supports Coordinator”})
in
#“Replaced Value 3”