Forum Discussion
Sector Name sorting not working in Water Fall Chart ( Power BI )
- 5 months ago
What can work in this case is to create a custom sort column and then use it as the Sort by Column for Sector_name. Once that is in place, the Waterfall chart will respect the sequence that you define manually.
1. Create a custom sort column (Power Query – recommended)
In Power Query, add a new column that defines the desired order explicitly. For example:PremiumSort = if [Premium_Flag] = "Premium" then if [Sector_name] = "Diversified Vehicles & Parts" then 1 else if [Sector_name] = "Healthcare" then 2 else if [Sector_name] = "High Tech" then 3 else if [Sector_name] = "Industrial Products" then 4 else 10 // other Premium sectors, if any else 20 // Non-Premium sectors
Load the data back into the model once this column has been created.2. Apply “Sort by Column” to Sector_name in Power BI DesktopIn the Fields pane:- Select the Sector_name column.
- On the Column tools tab, click Sort by Column.
- Choose the newly created PremiumSort column.
From this point on, whenever Sector_name is used in a visual (including the Waterfall chart), it will follow the sequence defined by the PremiumSort column.
What can work in this case is to create a custom sort column and then use it as the Sort by Column for Sector_name. Once that is in place, the Waterfall chart will respect the sequence that you define manually.
1. Create a custom sort column (Power Query – recommended)
In Power Query, add a new column that defines the desired order explicitly. For example:
PremiumSort = if [Premium_Flag] = "Premium" then if [Sector_name] = "Diversified Vehicles & Parts" then 1 else if [Sector_name] = "Healthcare" then 2 else if [Sector_name] = "High Tech" then 3 else if [Sector_name] = "Industrial Products" then 4 else 10 // other Premium sectors, if any else 20 // Non-Premium sectors
- Select the Sector_name column.
- On the Column tools tab, click Sort by Column.
- Choose the newly created PremiumSort column.
From this point on, whenever Sector_name is used in a visual (including the Waterfall chart), it will follow the sequence defined by the PremiumSort column.
Hi Zanqueta,
Thanks and kudos for your extreme support and i have tried this formula and working fine.
I am accepting the solution.
Thanks & Regards,
Bhaskar