Forum Discussion
tauqeer
7 years agoRegular Visitor
cols to rows
Hi
I am new to power bi, just a silly question, this data i have downloaded from web, as you
can see col 1-4 is one set and then its a same cols again from col 5 to col 8, is it possible to have col 5-8
to come under col 1-4 as its the same data and i need only col 1 to col 4 with the whole data.
instead of rank and rank 2 it should be only one col as rank, same as state and state 2 and viceversa.
please advise.
1 Reply
- parry2kSuper User
tauqeer add following steps in your query in advanced editor
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Rank", "Name", "State", "Pop."}), #"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Rank2", "Rank"}, {"Name2", "Name"}, {"State2", "State"}, {"Pop.2", "Pop."}}), #"Removed Columns1" = Table.RemoveColumns(#"Changed Type",{"Rank2", "Name2", "State2", "Pop.2"}), #"Appended Query" = Table.Combine({#"Removed Columns1", #"Renamed Columns"}) in #"Appended Query"