Forum Discussion

smishra99acres's avatar
1 year ago

Sorting Dimension

Hi i have to sort   bargraph in descending order .

I have a use case where  i need to show ageing data 

Above 30 Days

15_30 Days

10-15 Days

0-7 Days

In Power Bi there is no option to set order manally

 

6 Replies

  • Hi smishra99acres 

     

    Basing on the aging bucket, they should be sorted correctly following the order below without using a custom sort unless you have other buckets not in the list.

    0-7 Days
    10-15 Days
    15-30 Days
    Above 30 Days

     

    If that is the case, add another table that contains the bucket and the sort order, you can import it or used Power BI's enter data. Create a relationship from that to your fact table, and use the column from that table in your visuals

     

     

    • smishra99acres's avatar
      smishra99acres
      Helper I

      created relation between sorting table and fact table  and tried same way which you have suggested but nos solution  refer above graph i want 16-30 Days should be on second number.

       

      • smishra99acres's avatar
        smishra99acres
        Helper I

        Unless Sorting order will availalbe in how this is possbile visual to sort

    • smishra99acres's avatar
      smishra99acres
      Helper I
      Hi Please find my below use case where i have created a bucket and this i want to show in custom order on bar visuals
      Age Bucket = SWITCH(TRUE(),
          AND('lead'[Lead Age Calc]>0, 'lead'[Lead Age Calc]<=2), "A - 0-2Days",
          AND('lead'[Lead Age Calc]>2, 'lead'[Lead Age Calc]<=7), "B - 3-7Days",
          AND('lead'[Lead Age Calc]>7, 'lead'[Lead Age Calc]<=15), "C - 8-15Days",
          AND('lead'[Lead Age Calc]>15, 'lead'[Lead Age Calc]<=30), "D- 16-30Days",
          'lead'[Lead Age Calc]>30, "E -  Above 30Days", "Blank"
      )