Forum Discussion
How to sort a graph by ascending order
- 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
Well, you should create an index column by applying the below steps:
1. go to query editor ans select your Label Column then go to Add column menu and select Index Column. So it will automatically creates index column for starting with 0. Apply and close query editor.
2. Go to Data view tab from left most panel and select Label Column then go to modelling menu then choose Sort by column option and check mark the Index Column.
Don't forget to give thumbs up πand accept this as a solution if it helps you.
Hi Tahreem24 and TomMartens
When I create the index column and I select to sort by index in the label column the visuals crash:
How can I fix it ?
Thanks.
- o593936 years ago
Post Prodigy
I added the index to the visual and went from this:
To this:
I am getting everything with 100% when it should be the count of times as seen in the statement of the problem, how can I correct it?
Thanks!
- o593936 years ago
Post Prodigy
I attach the pbix, it contains the index column
https://1drv.ms/u/s!ApgeWwGTKtFdhiTj1pBzxG_8LkDW?e=SQDJ4f
In case you want to look and see the problem
Thanks π
- v-lili6-msft6 years ago
Community Support
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