Forum Discussion
Circular Dependency why using sort by column
- Anonymous3 years ago
Hi Ezzeldin ,
Please create the 2 columns in power query.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 3 years ago
thank you so much, when I create both columns on the power query it works fine. also, I have done another solution by making both columns reference the ID column not each other.
Hi Ezzeldin ,
If that's the case, I suggest you do it in Power query.
Please refer to my steps.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("NcixDcAgDATAXahTvDHG/7Mg9l8jETHd6dZqPQBY208xixR1qO6wUWTOODS4By+nfooZwy7Fb/cL", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if [ID]>=250000 and [ID]<=259999 then "Accumulated Depreciation" else if[ID]>=920000 and [ID]<=929999 then "Bank clearing Accounts" else if [ID]>=100000 and [ID]<=109999 then "Cash &Banks" else if [ID]>=980000 and [ID]<=989999 then "Other Clearing Accounts" else " "),
#"Renamed Columns" = Table.RenameColumns(#"Added Custom",{{"Custom", "level _1"}}),
#"Added Custom1" = Table.AddColumn(#"Renamed Columns", "Custom", each if [level _1] = "Accumulated Depreciation" then 1 else if [level _1] = "Bank clearing Accounts" then 2 else if [level _1] = "Cash &Banks" then 3 else if [level _1] = "Other Clearing Accounts" then 4 else 5)
in
#"Added Custom1"
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Ezzeldin3 years agoHelper I
I already try the custom column in the power query to create the "Sorting" Column and then use the "Sort by column" option on the level_1 column and still I face the same error.
- Anonymous3 years agoNot applicable
Hi Ezzeldin ,
Please create the 2 columns in power query.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Ezzeldin3 years agoHelper I
thank you so much, when I create both columns on the power query it works fine. also, I have done another solution by making both columns reference the ID column not each other.