Forum Discussion
simondpalmer
5 years agoNew Member
Cyclic error Table.AddColumn reference
Hi, I have cyclic error due to my Table.AddColumn(#"Promoted Headers".... ). I want to just add columns "GeoLocationLat" and "GeoLocationLong" but they are refering to "Promoted Headers". How do ...
- 5 years ago
Hi simondpalmer
Why aren't you referring to the previous step in the last 2 steps when you add the Lat and Long columns, like this:
#"Added Conditional Long Column" = Table.AddColumn(#"Added Conditional Column", "GeoLocationLong", each if Text.StartsWith([RevitFilePath], "\\sdlavfs1") then "-118.3965" else if Text.StartsWith([RevitFilePath], "\\sdocpsrv1") then "33.7175" else if Text.StartsWith([RevitFilePath], "\\sdsbvfs1") then "-119.6982" else null), #"Ädded Conditional Lat Column" = Table.AddColumn(#"Added Conditional Long Column", "GeoLocationLat", each if Text.StartsWith([RevitFilePath], "\\sdlavfs1") then "34.0211" else if Text.StartsWith([RevitFilePath], "\\sdsbvfs1") then "34.4208" else if Text.StartsWith([RevitFilePath], "\\sdocpsrv1") then "33.7175" else null)Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
PhilipTreacy
Super User
5 years agoHi simondpalmer
Why aren't you referring to the previous step in the last 2 steps when you add the Lat and Long columns, like this:
#"Added Conditional Long Column" = Table.AddColumn(#"Added Conditional Column", "GeoLocationLong", each if Text.StartsWith([RevitFilePath], "\\sdlavfs1") then "-118.3965" else if Text.StartsWith([RevitFilePath], "\\sdocpsrv1") then "33.7175" else if Text.StartsWith([RevitFilePath], "\\sdsbvfs1") then "-119.6982" else null),
#"Ädded Conditional Lat Column" = Table.AddColumn(#"Added Conditional Long Column", "GeoLocationLat", each if Text.StartsWith([RevitFilePath], "\\sdlavfs1") then "34.0211" else if Text.StartsWith([RevitFilePath], "\\sdsbvfs1") then "34.4208" else if Text.StartsWith([RevitFilePath], "\\sdocpsrv1") then "33.7175" else null)
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.