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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
CarlBlunck
Resolver I
Resolver I

Choose column - weird behaviour

I'm experiencing some weird behaviour in a dataflow.  Here is the code:

 

let
  Source = VP_Schedule,
  #"Filtered rows" = Table.SelectRows(Source, each [#"Paycode-level1"] = "Leave"),
  #"Choose columns" = Table.SelectColumns(#"Filtered rows", {"PERSONFULLNAME","P1StartDate", "Leave taken"}),
  #"Renamed columns" = Table.RenameColumns(#"Choose columns", {{"PERSONFULLNAME", "PERSONNUM"}}),
  #"Grouped rows" = Table.Group(#"Renamed columns", {"PERSONNUM", "P1StartDate"}, {{"PlannedLeaveInPeriod", each List.Sum([Leave taken]), type nullable number}})
in
  #"Grouped rows"
 
The weird behaviour is that when I perform the choose columns step, the PERSONFULLNAME is returning the values from the PERSONNUM column and vice versa.  It happened when I created this flow and I thought it was just a weird cache thing or something. So I deleted the flow and built it again, but its still doing it.
 
Anyone seen anything like this before?  Or know how I can get this investigated properly?
 
Thanks
Carl
1 ACCEPTED SOLUTION
CarlBlunck
Resolver I
Resolver I

Ignore this...  I was just having a moment and didn't realise I had an error in an sql query...

View solution in original post

2 REPLIES 2
CarlBlunck
Resolver I
Resolver I

Ignore this...  I was just having a moment and didn't realise I had an error in an sql query...

lbendlin
Super User
Super User

#"Renamed columns" = Table.RenameColumns(#"Choose columns", {{"PERSONFULLNAME", "PERSONNUM"}}),

 

Are you saying you now have two PERSONNUM columns in that table? Usually Power Query does not allow you to do that.

Helpful resources

Announcements
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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