Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply

Return a null Custom Connector Navigation Table Item

let

        ColumnNames = Table.ColumnNames(DatabaseRecords(num)),

        Tabled_Column_Data = ConvertToTable_SubTable(Table.Column(DatabaseRecords(num), ColumnNames{1})),

        objects = #table(
            {"Name",         "Key",   "Data",                                                    "ItemKind", "ItemName", "IsLeaf"},{

            {ColumnNames{0}, ColumnNames{0}, ConvertToTable_SubTable(Table.Column(DatabaseRecords(num), ColumnNames{0})), "Table",    "Table",    true},
            {ColumnNames{1}, ColumnNames{1}, ConvertToTable_SubTable(Table.Column(DatabaseRecords(num), ColumnNames{1})), "Table",    "Table",    true},
            {ColumnNames{2}, ColumnNames{2}, ConvertToTable_SubTable(Table.Column(DatabaseRecords(num), ColumnNames{2})), "Table",    "Table",    true},
            {ColumnNames{3}, ColumnNames{3}, ConvertToTable_SubTable(Table.Column(DatabaseRecords(num), ColumnNames{3})), "Table",    "Table",    true},
            {ColumnNames{4}, ColumnNames{4}, ConvertToTable_SubTable(Table.Column(DatabaseRecords(num), ColumnNames{4})), "Table",    "Table",    true}


        }),

        NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")

I am using this to create 5 items on a navigation table. I want a if statement for the last one aka 4th that checks t see if ColumnNames{4} is null, if it is then don't add it to the objects table. Is this possible?

1 REPLY 1
Anonymous
Not applicable

Hi @JackSoderstrom 

I think you can try Table.RowCount function in your M query. If count not blank row equal to 0, then return null.

Here I find a offical blog about Handling Navigation, I hope it could help you solve your problem.

For reference: Handling Navigation

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.