Forum Discussion
Table sorted in the same way as the query
Hello,
I have build a query, which, for each project, give an amount of estimated hours for a phase. The order in which the phase appears is very important, because it is chronological in the project.
| Project id | Phase | Budget (hours) |
| 38018 | Non phasé | |
| 38018 | ESQUISSE | 414 |
| 38018 | AVANT-PROJET SOMMAIRE | 1035 |
| 38018 | PERMIS D'URBANISME | 190 |
| 38018 | AVANT-PROJET DÉTAILLÉ | 430 |
| 38018 | DOSSIER D'EXÉCUTION / PRO | 1090 |
| 38018 | ASSISTANCE A LA NÉGOCIATION DES CONTRATS | 250 |
| 38018 | VISA | 470 |
| 38018 | RÉCEPTION PROVISOIRE | 180 |
| 38018 | RÉCEPTION DÉFINITIVE | 60 |
| 39001 | Non phasé | |
| 39001 | AVANT-PROJET SOMMAIRE | 162 |
| 39001 | AVANT-PROJET DÉTAILLÉ | 256 |
| 39001 | DOSSIER D'EXÉCUTION / PRO | 420 |
| 39001 | ASSISTANCE A LA NÉGOCIATION DES CONTRATS | 190 |
| 39001 | SUIVI DE CHANTIER | 1072 |
| 39001 | DOSSIER AS BUILT / DIU | 160 |
| 39001 | RÉCEPTION PROVISOIRE | 260 |
| 39001 | RÉCEPTION DÉFINITIVE | 40 |
| 39003 | Non phasé | |
| 39003 | FAISABILITÉ | 516 |
| 39003 | ESQUISSE | 516 |
| 39003 | AVANT-PROJET SOMMAIRE | 516 |
| 39003 | AVANT-PROJET DÉTAILLÉ | 826 |
| 39003 | PERMIS D'URBANISME | 2064 |
| 39003 | DOSSIER D'EXÉCUTION / PRO | 2270 |
| 39003 | SUIVI DE CHANTIER | 2580 |
| 39003 | RÉCEPTION PROVISOIRE | 516 |
| 39003 | RÉCEPTION DÉFINITIVE | 516 |
I have a slicer, which allows to select one project. I expect, for each project selected, to have in a table the same ordre than it was in the query. For example, for the id 39001 :
| Non phasé | |
| AVANT-PROJET SOMMAIRE | 162 |
| AVANT-PROJET DÉTAILLÉ | 256 |
| DOSSIER D'EXÉCUTION / PRO | 420 |
| ASSISTANCE A LA NÉGOCIATION DES CONTRATS | 190 |
| SUIVI DE CHANTIER | 1072 |
| DOSSIER AS BUILT / DIU | 160 |
| RÉCEPTION PROVISOIRE | 260 |
| RÉCEPTION DÉFINITIVE | 40 |
Unfortunately, i notice my table is in alphabetical order :
| ASSISTANCE A LA NÉGOCIATION DES CONTRATS | 190 |
| AVANT-PROJET DÉTAILLÉ | 256 |
| AVANT-PROJET SOMMAIRE | 162 |
| DOSSIER AS BUILT / DIU | 160 |
| DOSSIER D'EXÉCUTION / PRO | 420 |
| RÉCEPTION DÉFINITIVE | 40 |
| RÉCEPTION PROVISOIRE | 260 |
| SUIVI DE CHANTIER | 1072 |
Do you have any idea to keep the order as it was ithe the query?
Thanks,
Mike
You will need to create a Sort By Column for your phase column, either by adding another column or table to your model with the right order. Please see this link.
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column
Regards,
Pat
2 Replies
- mahoneypat
Microsoft Employee
You will need to create a Sort By Column for your phase column, either by adding another column or table to your model with the right order. Please see this link.
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column
Regards,
Pat
- AnonymousNot applicable
Thanks for your time!
Regards,
Mike