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

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.

Reply
hershey_ash
Regular Visitor

Day name not showing correctly in x axis

Hi,

 

I need to show the day name on line chart, where it shows the trend between months. i tried with 

Week_day_name = FORMAT([Date],"DDDD"), but when added to the axis with the date hierarchy, lines are not showing correctly. 

 

you can refer to the file here https://1drv.ms/u/s!AiiMgN0ScFCMcUC1Z-WnG70yabA?e=mwNngL

 

Your help is much appreciated. Thanks

 

 

1 ACCEPTED SOLUTION

Hi, @hershey_ash 

I download your ,pbix file.You can create a table as the date hierarchy.

Here are the steps you can refer to :

(1)We can click "New Table" and enter:

Date = ADDCOLUMNS(
CALENDAR(FIRSTDATE('data'[businessday_YYYY-MM-DD]),LASTDATE('data'[businessday_YYYY-MM-DD])),
"Month",FORMAT([Date],"MMM"),
"WeekDay", FORMAT([Date],"DDD"),
"WeekDayNum",WEEKDAY([Date]),
"MonthNum",MONTH([Date])
)

We can configure the filed sort by this:

vyueyunzhmsft_0-1664442973435.png

(2)We can put the field in this 'Date' table in the  visual to replace the filed you puted and then we can meet your need, the result is as follows:

vyueyunzhmsft_1-1664443066424.png

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

 

View solution in original post

5 REPLIES 5
hershey_ash
Regular Visitor

As the date is created using new column, 

businessday_YYYY-MM-DD = DATE(LEFT(data[Dim_BusinessDay_Key],4),MID(data[Dim_BusinessDay_Key],5,2),RIGHT(data[Dim_BusinessDay_Key],2)), there's only Year, Quarter, Month, Day in Date hierarchy. How to add the new Day name, so that it'll populate in the X axis data field?

 

hershey_ash_1-1664434322307.png

 

Hi, @hershey_ash 

I download your ,pbix file.You can create a table as the date hierarchy.

Here are the steps you can refer to :

(1)We can click "New Table" and enter:

Date = ADDCOLUMNS(
CALENDAR(FIRSTDATE('data'[businessday_YYYY-MM-DD]),LASTDATE('data'[businessday_YYYY-MM-DD])),
"Month",FORMAT([Date],"MMM"),
"WeekDay", FORMAT([Date],"DDD"),
"WeekDayNum",WEEKDAY([Date]),
"MonthNum",MONTH([Date])
)

We can configure the filed sort by this:

vyueyunzhmsft_0-1664442973435.png

(2)We can put the field in this 'Date' table in the  visual to replace the filed you puted and then we can meet your need, the result is as follows:

vyueyunzhmsft_1-1664443066424.png

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

 

Hi Aniya,

 

Apologies for the late reply. I've tested out your solution, but the daily total by weekday seems to be different from the daily total by date.  Do you have any idea? Thanks.

hershey_ash
Regular Visitor

hershey_ash_0-1664417756242.png

 

Hi , @hershey_ash 

According to your description, you want to show the WEEKDAY in the X-axis.Right?

On the X axis we can only modify the placed filed if we want to modify the display field.

You can try create a hierarchy to replace the field in X-axis.

For more infomation, you can refer to this :

Power BI Date Hierarchy - Complete tutorial - EnjoySharePoint

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.