cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xRTP
Helper II
Helper II

Counting saturday and sunday and add to friday

Hello Team!

 

I've been doing some reports and want to transfer it to power bi, the thing is. Transactions are done during weekdays US Locale time. Already set the locale to power bi as US Locale still some dates are appearing to be on saturday or sunday. Is it possible to add the items from saturday - sunday add this to friday? Or change the date from saturday & sunday into friday?

 

xRTP_0-1655730510247.png

 

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

Hi  @xRTP ,

Request Release Date turns grey What does it mean, can you tell us in the form of pictures, we can help you better

Here are the steps you can follow:

1. Create calculated column.

week = WEEKDAY('Table'[Request release Date],2)
weeknum = WEEKNUM('Table'[Request release Date],2)
Column 2 =
IF(
    'Table'[week] in {6,7},
 CALCULATE(MAX('Table'[Request release Date]),FILTER(ALL('Table'),'Table'[week]=
 MAXX(FILTER(ALL('Table'),NOT('Table'[week]) in {6,7}),[week])&&'Table'[weeknum]=EARLIER('Table'[weeknum])))
 ,
   'Table'[Request release Date])

2. Result:

vyangliumsft_0-1655964264904.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @xRTP ,

Request Release Date turns grey What does it mean, can you tell us in the form of pictures, we can help you better

Here are the steps you can follow:

1. Create calculated column.

week = WEEKDAY('Table'[Request release Date],2)
weeknum = WEEKNUM('Table'[Request release Date],2)
Column 2 =
IF(
    'Table'[week] in {6,7},
 CALCULATE(MAX('Table'[Request release Date]),FILTER(ALL('Table'),'Table'[week]=
 MAXX(FILTER(ALL('Table'),NOT('Table'[week]) in {6,7}),[week])&&'Table'[weeknum]=EARLIER('Table'[weeknum])))
 ,
   'Table'[Request release Date])

2. Result:

vyangliumsft_0-1655964264904.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Greg_Deckler
Super User
Super User

@xRTP You could create a calculated column like:

Column = 
  SWITCH(TRUE(),
    WEEKDAY([Request Release Date])=1,[Requeest Release Date] - 2,
    WEEKDAY([Request Release Date])=7,[Requeest Release Date] - 1,
    [Request Release Date]
  )

@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

Hi @Greg_Deckler,

 

My Request Release Date turns grey 

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors