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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
stewartfiserv
Frequent Visitor

Power BI dataflow null comparison failure

I think I have found a bug in Power BI Dataflows that does not occur in Power BI Desktop.  It has to do with null comparisons.  I have a step in my flow shown below:

Table.TransformColumns(AddedPrimaryKey, {{"Parent Id", each if _ <> null then Number.FromText(Text.End(_, Text.Length(_)-2)) else null, Int32.Type}})

 

The resulting table shows that the Parent Id field has null values.  You can see them.  

 

However, when I try to filter records where [Parent Id] = null, I do not get any matches.  It's as if the null value retruned by Transform Columns is not a normal null value.  If I run the same filter prior to this step if finds records. 

 

Any idea what I am doing wrong in this step?  Is this really a bug?

1 REPLY 1
stewartfiserv
Frequent Visitor

I was able to fix the issue by splitting the step:

 

 

    TransformedParentId = Table.TransformColumns(AddedPrimaryKey, {{"Parent Id", each if _ = null then _ else Number.FromText(Text.End(_, Text.Length(_)-2))}}),
    ChangedParentIdColumnType = Table.TransformColumnTypes(TransformedParentId, {{"Parent Id", Int64.Type}}),

Is this a bug?

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors