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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
BPTBPTBPT
Helper II
Helper II

Struggling with the date axis

Hello,

 

What I would like to achieve is pretty baisc, still I cannot get it right.

I would like to see a graph with:

Y-axis = # documents created

X-axis = when they were created. Preferably per week.

 

I use a grouped column graph (I think it is called like that in English). However, the date axis is problematic.

2022-05-05.png

This is what I have now. 

1) Why does it not sort properly on the x-axis? Of course I need the days to be chronologically.

2) How do I get it per week instead of per day? I read some articles on date tables. Is a date table what I need? To find out, I created one with a week column in it, but then got stuck. What do I do with the date table once I have it?

 

This is it:

2022-05-05 09_33_18.png

I tried adding it to the graph, but I am lost where/how. 

 

Thanks in advance!

1 REPLY 1
amitchandak
Super User
Super User

@BPTBPTBPT , It is better to create a date table with column you want with the requires sort columns

 

Week = if('Date'[Week Number]<10,'Date'[Year]*10 & 'Date'[Week Number],'Date'[Year]&'Date'[Week Number])

 

is can be sorted on

Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)

 

Month Year = FORMAT([Date],"mmm-yyyy")
Month Year sort = FORMAT([Date],"yyyymm")

 

You need select month year column and from column tool select sort column -> month year sort . same is for week

 


To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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