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 Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors