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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
prathyoo
Advocate II
Advocate II

Dataflow and Dataset treating null differently

We have a master dataset that was configured to connect to an Oracle database. Nearly 30 odd reports  have been built on this dataset (which has around 20 tables - dimensions and facts) using live connections.  Each table in power query is a SQL statement to the Oracle DB. Any filter or slicer that uses a column with null values show us as follows in the UI -

prathyoo_3-1599729091429.png

 

 

Null values in the db connected dataset shows up as the literal - "(Blank)" and we have been happy with this and we have also used measures with expressions like IsBlank without any issues.

 

Now we decided to separate the dataset into a dataflow and a dataset that connects to the dataflow. The power query in the dataflow was the original SQL statements from the above dataset. The new dataset that was created used power query to retrieve the dimensions and facts from the dataflow. Since every table and every column was an exact match, we could seamlessly replace the original dataset with the new dataset and all the reports using the live connections without any further changes. We tested each report and all the values seem to match but then we realized that null values are being treated differently now -

 

prathyoo_2-1599728930909.png

The null values in the original dataset that existed have now become empty strings in the dataset that connects to the dataflow. We decided to compare the power queries across the original dataset and dataflow and the new dataset (which uses the dataflow). Here are our finding for the above column -

 

Original DB Connected dataset - (this shows the null value as the literal "(null)")

prathyoo_4-1599729614755.png

 

The dataflow that uses this exact SQL - This also shows the literal "(null)". So far both are a match.

prathyoo_5-1599729806668.png

 

And here is the dataset that connects to this dataflow (in other words the csv in the internal power bi storage) - 

Here the literal "(null)" has been replaced with "(blank)"

prathyoo_6-1599730184015.png

 

Now we compared the tabular model of the dataset connected to db and the dataset connected to the dataflow. Now here is the surprising finding -

 

Original DB Connected dataset - the literal "(null)" in the power query was replaced as "(Blank)" in the tabular model.

And the dataset that connects to the dataflow - the literal "(blank)" in the power query has been replaced by an empty string.

Screenshots to follow.....the message board is not allowing me to add additional screenshots...

 

Now, because of this change in behaviour, looks like we will have to further transform all the power queries in the second dataset and replace all "(blank)" with "(null)" but that is what we wanted to avoid when using dataflows. That is, one team maintains the power query in the dataflow and every other team just consumes this.

7 REPLIES 7
paul_sanders
Frequent Visitor

Just hit this issue as well.  It is appalling behavior, IMO, as it means that converting a PowerQuery straight to a source, to one going via a Dataflow, does not preserve behavior. In my case, rows were silently lost because I had filters on (null).  Even changing to reflect the obvious impact on filter then means need to consider possible impact everywhere else. Given that PowerQuery distinguishes Nulls and Space, storing as CSVs (with no special null handling) was maybe not the best of  ideas ! 

prathyoo
Advocate II
Advocate II

Here are the screenshots -

 

Original DB Connected dataset - the literal "(null)" in the power query was replaced as "(Blank)" in the tabular model -

prathyoo_1-1599731493287.png

 

And here is the dataset that connects to the dataflow - the literal "(blank)" in the power query has been replaced by an empty string.

 

prathyoo_0-1599731466042.png

 

@edhans  ?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

This is apparently still the case. Had a client that processed the same spreadsheet in dataflows vs desktop, with the same Mcode. Service processed as blanks, desktop returned null. To mirror the table in both, he had to processs for both null and blanks.

@Greg_Deckler   Thanks for taking notice of this issue. Would you be able to help us out. We have separately raised this with support and are waiting to see how that proceeds.

Anonymous
Not applicable

Hi, did you receive any reply from support on this behaviour?

Yes, but not a favorable one. The ticket was escalated to the product team. PG team said that dataflow tables are stored in csv files and as such have no difference conceptually between empty and null. Null and empty values from source are both saved as empty values. They have suggested that I need to add a step to modify null values from the source to "null" strings.

 

That means I would need to do this for every table that has a text column where there is a potential that the column could have blank values for some of the records. 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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