SOLVED

Power Query Table.Profile: The field 'NullCount' of the record wasn't found

Silver Contributor

With Microsoft Excel for Microsoft 365 MSO (Version 2403 Build 16.0.17425.20124) 64-bit and Power BI Desktop Version: 2.127.1327.0 64-bit 

let
    Source = Table.FromColumns({{1..3}, {"a"}},
        type table [A=Int64.Type, B=Text.Type]
    ),
    Profiled = Table.Profile(Source),

    Issue = Table.SelectRows(Profiled, each [NullCount] = 0),
    // ==> Expression.Error: The field 'NullCount' of the record wasn't found
    
    Workaround1 = Table.SelectRows(
        Table.SelectColumns(Profiled,
            // Same error with: Table.ColumnNames(Profiled)
            {"Column", "Min", "Max", "Average", "NullCount"}
        ),
        each [NullCount] = 0
    ),
    Workaround2 = Table.SelectRows(
        Table.TransformColumnTypes(Profiled, {{"NullCount", Int64.Type}}),
        each ([NullCount] = 0)
    )
in
    Workaround2

 

Frown sent

2 Replies
best response confirmed by L z. (Silver Contributor)
Solution

@L z. 

It works as

 

let
    Source = Table.FromColumns({{1..3}, {"a"}},
        type table [A=Int64.Type, B=Text.Type]
    ),
    Profiled = Table.Profile(Source),
    Issue = Table.SelectRows(Profiled, each [NullCount] = 0),
    // ==> Expression.Error: The field 'NullCount' of the record wasn't found
    
    WokrsAs = Table.SelectRows( Table.StopFolding( Profiled ), each ([NullCount] = 0)
    )

in
    WokrsAs

 

Table.Profile - Function | Power Query How

1 best response

Accepted Solutions
best response confirmed by L z. (Silver Contributor)
Solution

@L z. 

It works as

 

let
    Source = Table.FromColumns({{1..3}, {"a"}},
        type table [A=Int64.Type, B=Text.Type]
    ),
    Profiled = Table.Profile(Source),
    Issue = Table.SelectRows(Profiled, each [NullCount] = 0),
    // ==> Expression.Error: The field 'NullCount' of the record wasn't found
    
    WokrsAs = Table.SelectRows( Table.StopFolding( Profiled ), each ([NullCount] = 0)
    )

in
    WokrsAs

 

Table.Profile - Function | Power Query How

View solution in original post