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.
Hi everyone,
I created a few charts in power bi (line chart, 100% stacked column chart, stacked column chart). The X-axis shows the date of each week (my week runs from every Thursday to Wednesday).
Below is a screenshot of one of the X-axis. I see that 6/15 is before 6/8 and I tried to sort axis asceding by 'start of week' but it didn't work. Can someone let me know how to make them in the correct order please? I have a calendar table and one column being 'start of week'.
This is how the order of the date in my calendar table looks like:
Thank you!
Solved! Go to Solution.
You need to change the type of your dates. Right now, they are being sorted as if they were strings.
Power Query can do that for you - guide here
Hi @kathyyy19
Are you actually plotting the date on the x axis? Looks like you are not, if you are using a text field like the 'Start of Week' you created, you'll get this issue because the values on your x axis are actually text, not dates.
Try just using the date on the x-axis.
Regards
Phil
Proud to be a Super User!
Hi @kathyyy19
Are you actually plotting the date on the x axis? Looks like you are not, if you are using a text field like the 'Start of Week' you created, you'll get this issue because the values on your x axis are actually text, not dates.
Try just using the date on the x-axis.
Regards
Phil
Proud to be a Super User!
Thank you Philip! I think I figured it out. Yes, you are right. My dates are in text format not dates so I transformed them into dates. Then I used format visual->x-axis->type, and changed type from 'continuous' to 'categorical' and the x-axis are now showing start of week dates.
You need to change the type of your dates. Right now, they are being sorted as if they were strings.
Power Query can do that for you - guide here
Thank you Vicky for your help!!
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 |
---|---|
103 | |
101 | |
84 | |
77 | |
66 |
User | Count |
---|---|
135 | |
109 | |
104 | |
83 | |
73 |