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 , Industrial products to show from the left as they  are categorized as premium and rest  followed Non-premium values irrespective of NRPP measure value (Net Revenue Per piece ).

 

 

Sample data.

 

YearSector_namePremium_FlagNRPP x Fuel
2024Apparel and Consumer GoodsNon-Premium33.55
2024Diversified Vehicles & PartsPremium36.08
2024GovernmentNon-Premium32.25
2024HealthcarePremium35.87
2024High TechPremium45.12
2024Industrial ProductsPremium44.23
2024OtherNon-Premium42.89
2024Professional ServicesNon-Premium46.12
2024UnclassifiedNon-Premium43.9
2025Apparel and Consumer GoodsNon-Premium33.69
2025Diversified Vehicles & PartsPremium37.54
2025GovernmentNon-Premium35.57
2025HealthcarePremium35.24
2025High TechPremium48.29
2025Industrial ProductsPremium43.28
2025OtherNon-Premium44.19
2025Professional ServicesNon-Premium46.02
2025UnclassifiedNon-Premium49.04

 

 

Could you please assit me to fix this issue . thanks for your support in advance.

 

Regards,

Bhaskar

 

 

 

 

  • 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.
        

       

     

     

2 Replies

  • 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.
        

       

     

     

    • bhaskarpbi9999's avatar
      bhaskarpbi9999
      Icon for Helper I rankHelper I

      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