cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jay_patel
Helper III
Helper III

Want week Number from 1 for those months also where week starting from saturday or sunday.

Hi experts

 

Here is my graph as you can see in attached picture and selected month year is 'MAY-2021' where week 1 started from saturday so they dont have sales in week 1, however I want to consider from week 1 only. In the second screenshot you can see I am extracting WEEK NO from Transaction date, So is there any way where i can consider week 2 as week 1 and so on for the months that dont have sales in 1st week.

 

Thanks & RegardsMIS 1.PNGweek of the month.png

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @jay_patel ,

 

Create a column with dax expression as below:

Adjusted week no = 
var _firstday=STARTOFMONTH('Table'[Date])
var _weekday=WEEKDAY(_firstday,2)
Return
IF(_weekday=6||_weekday=7,
  IF('Table'[Week month]=1,BLANK(),"Week"&('Table'[Week month]-1)),
   "Week"&'Table'[Week month])

Then you would see:(Remember to modify the data type of "Week month" to whole number)

v-kelly-msft_0-1623655016105.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

View solution in original post

1 REPLY 1
v-kelly-msft
Community Support
Community Support

Hi @jay_patel ,

 

Create a column with dax expression as below:

Adjusted week no = 
var _firstday=STARTOFMONTH('Table'[Date])
var _weekday=WEEKDAY(_firstday,2)
Return
IF(_weekday=6||_weekday=7,
  IF('Table'[Week month]=1,BLANK(),"Week"&('Table'[Week month]-1)),
   "Week"&'Table'[Week month])

Then you would see:(Remember to modify the data type of "Week month" to whole number)

v-kelly-msft_0-1623655016105.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors