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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
mateoc15
Helper II
Helper II

Continuous value from week number and day of week

I have a line chart and I want to see two lines, one for current year and one for previous year, but I want to do so by the week number and day of week because Saturdays and Sundays always have lower numbers so I want to compare, for instance, the first Saturday 2024 to first Saturday of 2023, rather than Jan 1 2024 to Jan 1 2023.  I have that figured out.  My X axis is discrete values though - first the week number, then the day of week.  Because of this there's a horizontal scroll bar and I want to get rid of it.  Is there any way to make such a YoY day of week a continuous thing?  I want to see all 53 weeks at once without scrolling.

mateoc15_0-1727382108649.png

mateoc15_1-1727382175330.png

 

7 REPLIES 7
parry2k
Super User
Super User

@mateoc15 Yeah, not sure why it wouldn't work. It works with the format function but that will defeat the purpose because it will change the date to a text and you will not get the continuous option.

 

I guess report it as an issue, I don't have any more suggestions for you. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I could have sworn I saw "ww" or "WW" as a date format string, but maybe not? https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-custom-format-strings When I enter "ww ddd" or "WW ddd" it just comes out as "Mon", like ddd only.

Here's a hack I don't really like, but it's continuous - Tuesday, Jan 1 would be "1.3" - week one, third day of the week (Sun-Sat).  It's not really readable though.

WEEKNUM([Date]) + (WEEKDAY([Date])/10

Hi @mateoc15 ,

 

As far as I know, if you want to use continuous data in the visual x-axis, the best way to do it is to use columns of numeric or date type, not text type.

I don't think “ww” works in the format, only year/quarter/month/day in time intelligence.” ww” doesn't make sense.

Your alternative is actually correct, you could try using.

WW DD = WEEKNUM([Date])*100 + (WEEKDAY([Date])

That might be a bit more intuitive.

vrzhoumsft_0-1727764704665.png

 

Best Regards,
Rico Zhou

 

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

 

Thanks so much, definitely the right direction.  I'll tinker with the formatting.  In the meantime I've created a week number/day of week hierarchy and at least I can drill up/down.

@mateoc15 @Sounds good 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@mateoc15 try this, I think it will work, make a copy of the date column and call is "day name" or whatever name you want, and in the format string add the following, and use this column instead of the current column you are using for the day name.

 

parry2k_0-1727382572023.png

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I think this is moving in the right direction.  I want the week as well as day of week, so I tried "ww ddd" but it doesn't seem to work.  Reference https://learn.microsoft.com/en-us/dax/format-function-dax#custom-datetime-formats

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.