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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
xRTP
Helper V
Helper V

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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler,

 

My Request Release Date turns grey 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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