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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Narasimha
Helper I
Helper I

Week formats

Hi Team,

 

I want to display the visual like below Capture.PNG

Instead of belowCapture2.PNG

I want week starts from Monday to sunday..

How to do the same..

 

Thnaks in advance

 

1 ACCEPTED SOLUTION

Hi @Narasimha

 

If you go into the Query Editor and then the Date table.

Click on Add Column in the ribbon and then click on Custom Column, and give it a name.

Put in the following code below.

 

Date.ToText(Date.StartOfWeek([Calendar Date], Day.Monday),"MM/dd") & "-" & Date.ToText(Date.EndOfWeek([Calendar Date], Day.Monday),"MM/dd")

This will then create the column you require.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

9 REPLIES 9
GilbertQ
Super User
Super User

Hi @Narasimha

 

What I would suggest is to create a Date table, then create a relationship from your current table to the Date table.

Once you have the date table you will see that there are a whole lot of extra columns which you can use, or even create. After which you can then use any of those columns for your visual.

 

Power BI – How to Easily Create Dynamic Date Table/Dimension with Fiscal Attributes using Power Quer...





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Thanks For the update guavaq..I was created Date table and created relationship b/w date table and our data table. 2nd visual  i was created using date table with below query

Week1 = CONCATENATE("Week-",WEEKNUM(DimDate[Date],2))

here in above dax, 2 means week starts from monday..

 

That is great going, do you now have it in the format you require?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

No.. I want to create Line chart using power bi desktop with below x axis date format instead of Week1, Week2,Week3

 

Capture.PNG

Note : Above visual was created using Excel

 

Ok, so if you go back into the Query Editor you can add a new column where you can then create the values for each week as per your image into this new column.


Then you can use this column for your visual?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Can i have sample DAX formual?

Hi @Narasimha

 

If you go into the Query Editor and then the Date table.

Click on Add Column in the ribbon and then click on Custom Column, and give it a name.

Put in the following code below.

 

Date.ToText(Date.StartOfWeek([Calendar Date], Day.Monday),"MM/dd") & "-" & Date.ToText(Date.EndOfWeek([Calendar Date], Day.Monday),"MM/dd")

This will then create the column you require.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Hi @GilbertQ,

 

Am getting below error while trying to create new column in Date table. Could you please help me out.

Capture3.PNG

You forgot to go into the Query Editor.

The code from @GilbertQ is Power Query (M), not DAX.

Specializing in Power Query Formula Language (M)

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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