Forum Discussion

bhaskarpbi9999's avatar
5 months ago
Solved

Sector Name sorting not working in Water Fall Chart ( Power BI )

Hi ,   I have created a water fall chart using columns below.     And the chart looks like below.     The issue is i  need to show Diversied Vehicle , Healthcare , Hightech , Indu...
  • Zanqueta's avatar
    5 months ago

    Hi  bhaskarpbi9999 

    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 Desktop
    In the Fields pane:
    1. Select the Sector_name column.
    2. On the Column tools tab, click Sort by Column.
    3. 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.