Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

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 idPhaseBudget (hours)
38018Non phasé 
38018ESQUISSE 414
38018AVANT-PROJET SOMMAIRE1035
38018PERMIS D'URBANISME190
38018AVANT-PROJET DÉTAILLÉ430
38018DOSSIER D'EXÉCUTION / PRO1090
38018ASSISTANCE A LA NÉGOCIATION DES CONTRATS250
38018VISA470
38018RÉCEPTION PROVISOIRE180
38018RÉCEPTION DÉFINITIVE60
39001Non phasé 
39001AVANT-PROJET SOMMAIRE162
39001AVANT-PROJET DÉTAILLÉ256
39001DOSSIER D'EXÉCUTION / PRO420
39001ASSISTANCE A LA NÉGOCIATION DES CONTRATS190
39001SUIVI DE CHANTIER1072
39001DOSSIER AS BUILT / DIU160
39001RÉCEPTION PROVISOIRE260
39001RÉCEPTION DÉFINITIVE40
39003Non phasé 
39003FAISABILITÉ516
39003ESQUISSE 516
39003AVANT-PROJET SOMMAIRE516
39003AVANT-PROJET DÉTAILLÉ826
39003PERMIS D'URBANISME2064
39003DOSSIER D'EXÉCUTION / PRO2270
39003SUIVI DE CHANTIER2580
39003RÉCEPTION PROVISOIRE516
39003RÉCEPTION DÉFINITIVE516

 

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 SOMMAIRE162
AVANT-PROJET DÉTAILLÉ256
DOSSIER D'EXÉCUTION / PRO420
ASSISTANCE A LA NÉGOCIATION DES CONTRATS190
SUIVI DE CHANTIER1072
DOSSIER AS BUILT / DIU160
RÉCEPTION PROVISOIRE260
RÉCEPTION DÉFINITIVE40

 

Unfortunately, i notice my table is in alphabetical order : 

 

ASSISTANCE A LA NÉGOCIATION DES CONTRATS190
AVANT-PROJET DÉTAILLÉ256
AVANT-PROJET SOMMAIRE162
DOSSIER AS BUILT / DIU160
DOSSIER D'EXÉCUTION / PRO420
RÉCEPTION DÉFINITIVE40
RÉCEPTION PROVISOIRE260
SUIVI DE CHANTIER1072

 

Do you have any idea to keep the order as it was ithe the query?

 

Thanks, 

 

Mike

 

 

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
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

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
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

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Thanks for your time!

 

Regards,

 

Mike

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.