Forum Discussion
LIne chart x-axis labels with two data series issue
The table feeding the line chart's x-axis consists of four columns: SundayDt (date), PYSundayDt (date), SundayDtLabel (text created from the SundayDt formatted as "MM/dd") and DashboardWeek (logical).
Variables in the table (ReportMonth & ReportYear) create a table that has true for a consecutive 4-month range of Sundays and their corresponding Sunday in the previous year.
The data points for the two y-axis ranges are the attendance on each week where DashboardWeek is true for CY & PY.
I've sorted the SundayDtLabel column by the SundayDt column. The x-axis label need to be month and day number (as shown in the image below).
PROBLEM: date labels are not displaying in chronological order.
Hi newhopepdx,
Thank you for reaching out to the Microsoft fabric community forum. Also, thanks to Shahid12523, danextian, for those inputs on this thread. I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.I am also including .pbix file for your better understanding, please have a look into it:
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Fabric Community Forum.
4 Replies
- danextian
Super User
Hi newhopepdx
If you have the actula date column, use that instead, go to data format and format the date as MM/dd
- Shahid12523
Community Champion
Use SundayDt as the x-axis (continuous).
Create SundayDtLabel = FORMAT([SundayDt], "MM/dd") and set Sort by column → SundayDt.
This way labels show MM/dd, but sort in correct date order. - v-kpoloju-msft
Community Support
Hi newhopepdx,
Thank you for reaching out to the Microsoft fabric community forum. Also, thanks to Shahid12523, danextian, for those inputs on this thread. I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.I am also including .pbix file for your better understanding, please have a look into it:
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Fabric Community Forum.- newhopepdx
Resolver I
Thanks that's the trick.