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
Rup10
Resolver I
Resolver I

Week of year issue

Hi Team,

 

Am using direct query mode because the dataset is huge and all transformations are done in databricks. there is one data timestamp column from that am extracting week of year in databricks and loading data to powerbi.

Till 2020 the week number is coming correctly but when it comes to dec 2021 52nd week the graph is showing incorrectly.I have attached images below for reference.

image2image2

In the above image in starting graph it is showing dec52nd 2021 week and in below image also it is showing dec 52 week 2021 means it showing 2times and for feb 9th week 2022 and march 9th week 2022 is also showing 2 times.

feb9.png

The data should not show duplicate weeks. Can someone please help with above issue.

Thanks in advance

2 REPLIES 2
amitchandak
Super User
Super User

@Rup10 , Based on what I got you should create a sort column on year week

 

like

[year]*100 + [week] and mark that as sort column for week

 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

 

 

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

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

Hi @amitchandak ,

 

Am using direct query mode so i cant add above queries.

Helpful resources

Announcements
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.