Quantcast
Channel: Service topics
Viewing all articles
Browse latest Browse all 61930

Dataflow and Dataset treating null differently

$
0
0

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.


Viewing all articles
Browse latest Browse all 61930

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>