Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey guys,
I just uploaded data into Power BI Desktop via an excel file. Everything looks good. Everything is sorted by Month starting in April. In the data view it shows correct, in the visualization in the report the order ist totally wrong. I tried everything but couldn't figure out where the problem lies.
Thanks in advance
Solved! Go to Solution.
@Anonymous ,
You can accomplish the correct sorting by creating a sort table:
Then build a relationship between the two tables and use the Month field from your new table instead. Then you can sort it ascending by your new month field.
In addition, if you have a date table with a date, I would suggest building a column for your year + monthnumber and sort your Month Name + Year by that.
Hi @Anonymous ,
You could refer to the following DAX:
Month Num =
SWITCH (
'Table 2'[Month],
"January", 1,
"February", 2,
"March", 3,
"April", 4,
"May", 5,
"June", 6,
"July", 7,
"August", 8,
"September", 9,
"October", 10,
"November", 11,
"December", 12
)
If you have a detail date column, you could use MONTH() function to get month number.
Then you could get a correct order with these numbers.
What about the sort order being returned is incorrect? Incomplete? Is it retunring 1, 10, 11, 12, 2, etc? Tough to say without seeing more of your current configuration but assuming your date field is in the correct format, I would start by ensuring you have the specific visual in question sorting correctly..
Click the ellipsis at top right of your visual, check that "Sort by" is set to your date and in the correct direction.
Hey,
I can't really see any order in the wrong display months. I selected the visual to be sorted by Month, but, it just doesn
t use the order how it is in the data view. For ex. right now it is using April, August, December, February, January ... makes no sense at all, it's doing alphabetical, but it should just leave the order how it is in the data view. 😞
@Anonymous ,
You can accomplish the correct sorting by creating a sort table:
Then build a relationship between the two tables and use the Month field from your new table instead. Then you can sort it ascending by your new month field.
In addition, if you have a date table with a date, I would suggest building a column for your year + monthnumber and sort your Month Name + Year by that.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |