Forum Discussion

o59393's avatar
o59393
Icon for Post Prodigy rankPost Prodigy
6 years ago
Solved

How to sort a graph by ascending order

Hi all   I need to sort a graph in descending order, the problem I have is that it recognizes for example a 15 before a 2, must be because it starts with 1.   As seen in the red graphs it starts ...
  • v-lili6-msft's avatar
    v-lili6-msft
    6 years ago

    HI o59393 

    Just add just the model as below:
    Step1:

    Use this formula to create Total Sanitary Reg Time Interval column

    Total Sanitary Reg Time Interval = calculate(FIRSTNONBLANK(dimIntervals[Label],1),FILTER(dimIntervals,dimIntervals[MinPeriod]<(Ticket[*Department time]+Ticket[Cycle Time (Process)]+Ticket[*Submission to government]) && dimIntervals[MaxPeriod]>=(Ticket[*Department time]+Ticket[Cycle Time (Process)]+Ticket[*Submission to government]) ))

    Step2:

    Create a relationship between 'Ticket' table and 'dimIntervals' table

     

    Step3:

    Now set sort by column and when you create visuals, use [Label] instead of [Total Sanitary Reg Time Interval]

     

    and here is sample pbix file, please try it.

     

    Regards,

    Lin