Forum Discussion
Create hierarchy with one column only
- Anonymous4 years ago
Hi WaleedBinAli ,
Does your Expense column all end at a level in the Total row? If yes, you can try extracting the Total rows and then padding them up to get a hierarchy.
1.Add a conditional column to get the row contains 'Total'.
2.Fill up.
3.You can remove the 'Total' by adding a custom column.
4.Trim the column to remove the space.
Then the problem is that the first and last lines of each group are not needed, such as "Revenue" and "Total Revenue". The solution is to sort in groups and then delete the first and last lines, which I will not describe in detail here. You can view my attachments and go to Power Query to see the detailed steps.
This is the final result.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi WaleedBinAli ,
Does your Expense column all end at a level in the Total row? If yes, you can try extracting the Total rows and then padding them up to get a hierarchy.
1.Add a conditional column to get the row contains 'Total'.
2.Fill up.
3.You can remove the 'Total' by adding a custom column.
4.Trim the column to remove the space.
Then the problem is that the first and last lines of each group are not needed, such as "Revenue" and "Total Revenue". The solution is to sort in groups and then delete the first and last lines, which I will not describe in detail here. You can view my attachments and go to Power Query to see the detailed steps.
This is the final result.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- WaleedBinAli4 years agoFrequent Visitor
Thanks done with switch statements it was easy thanks alot