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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Mamboure
New Member

Table

Bonjour, 

 

Voilà j'ai un dataset constitué de données de visites renseignées par semaine, du coup j'ai une colonne semaine contenant sur chaque ligne Semaine(x) avec x le numéro de semaine, soit semaine 1, semaine 10, semaine 3 etc...
En réalité c'est pas du tout ordonnées, je voudrais donc faire un histigramme du nombre de visite en des semaines, mais dans le rendu les semaines ne se suivent pas.

je mets en pj la photo, je voudrais donc savoir comment faire pour réodonner, sur excel il suffit de déplcer mais je ne sais pas du tout comment faire sur power bi.

Mamboure_0-1663757054923.png

 



Merci d'avance pour votre aide. 

1 ACCEPTED SOLUTION

(Apologies, I'm reverting to english for this explanation!)

Select "Modeling" in the ribbon -> new table and create a new dimension table for Semaine using:

Dim Semaine = 
ADDCOLUMNS(
    DISTINCT('Table'[Semaine ]),
    "Ordre", INT(RIGHT([Semaine ], 2)))

 dim.png

Order the "ordre" field in ascending order. Select the dSemaine field and select "Sort column by" in the ribbon and select "Ordre":

weeks.gif

 

Create a one-to-many single direction relationship between the corresponding fields from th dimension table to the fact table in the modeling view:

model1.gif

 Now set up the visual using the dSemaine field from the dimension table and add the measure to get:

result.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

3 REPLIES 3
PaulDBrown
Community Champion
Community Champion

Il faut "clicker" sur les points de suspensions et choisir "Trier par" -> "Semaines"

Mamboure_0-1663757054923.png





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Merci pour ton retour mais le filtre proposé par les points de suspensions le font juste par odre croissant ou décroissant vu que chaque semaine a sa cardinalité , ça permet pas d'organiser la liste de mes semaines normalement,

(Apologies, I'm reverting to english for this explanation!)

Select "Modeling" in the ribbon -> new table and create a new dimension table for Semaine using:

Dim Semaine = 
ADDCOLUMNS(
    DISTINCT('Table'[Semaine ]),
    "Ordre", INT(RIGHT([Semaine ], 2)))

 dim.png

Order the "ordre" field in ascending order. Select the dSemaine field and select "Sort column by" in the ribbon and select "Ordre":

weeks.gif

 

Create a one-to-many single direction relationship between the corresponding fields from th dimension table to the fact table in the modeling view:

model1.gif

 Now set up the visual using the dSemaine field from the dimension table and add the measure to get:

result.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.