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
Anonymous
Not applicable

Space Character in Field Names acting differently in Power BI Dataflows and Power Query

I am trying to convert some of my standard Power BI Power Query data sets to Power BI Dataflows.  I have found this experience very frustrating, with the Dataflows not recognizing the code copied over from my existing PQ queries.

 

It looks to me that Power BI Dataflows and Power BI (Desktop) Power Queries are doing something differently with the space characters in my field names, making the fields effectively completely different.

 

Has anyone had this issue and have any thoughts?  It is quite frustrating.

 

Below is a screenshot of the pasting these fields into NotePad++.

jpetrelli_0-1598046123017.png

 

5 REPLIES 5
pranit828
Community Champion
Community Champion

HI @Anonymous 

Chek the below link it will guide you step by step to setup dataflows

https://exceleratorbi.com.au/moving-queries-from-power-bi-desktop-to-dataflows/





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
Anonymous
Not applicable

@pranit828 

Thank you for the post.  I will read through it more thoroughly, but do not think it address the issue.  Moreso, it validated my approach.

 

My issue is that the copied PQ code is responded to differently in the Dataflow.

The example screenshot field, [TIME IN], is not recognized, so the working PQ query fails when that field is called in the Dataflow.  I don't believe the Dataflow has an issue with ALL fields that have spaces, but definitely any fields used for formulas, joins or that are explicitly called out for functions, such as Reorder, Sort or Filters.

 

Any other thoughts are welcomed.
(And thank you for directing me to the post.  I will definitely review it more closely.)

Two potential workarounds you could try. 

1.  You may be able to use a relative reference instead of an absolute one to solve your issue.  Upstream of your error you can rename that column by its position in Table.ColumnNames() which is a funciton that lists all the column names of the previous step

 

For example, where you see "Time In" in a formula, assuming it is the third column you can replace that with Table.ColumnNames(#"Previous Step"){2}     (power query starts counting at 0, so 2 is used instead of 3)

 

 

2.  Alternately, you could use a try ... otherwise around a step that tries to rename it to Time In to match the other Time In.  In the case it doesn't find it, it won't error.  Once the names match up, all the downstream steps will process w/o error.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Pat,

 

Thank you for your suggestions.  They offer some interesting possibilities as workarounds.

 

However, before I adapt any of my queries and logic, I am hoping to identify why this is happening.  It does not seem a desirable "feature".

Have others experienced this issue?  Is it pssibly an unintended consequence of a setting I adjusted somewhere?

 

Treating spaces as different characters based on environment seems contradictory to all the efforts made to integrate Power BI and Power Queries.

 

Are there any troubleshoot areas to review or to explore that might address this issue directly, instead of requiring workarounds?

 

Thank you.

 

Joe

 

Anonymous
Not applicable

I think I may have identified the contributing factor...

 

I was copying my queries to and from OneNote and it seems that introduces the space character issue.  I have been able to replicate the issue once already.

 

I am not sure if it is all copy and paste activity, such as into NotePad++ instead, or just with OneNote.  I will continue exploring.

 

Should I report this to MS somewhere?

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.