cancel
Showing results for
Search instead for
Did you mean:
Highlighted
Regular Visitor

## DAX Weekday Name UTC Current Year Today and Last Year Today

Hello,
I am trying to extract the Weekday Name (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday) for Current Year Today and Last Year Today. I used this formula =UPPER(FORMAT(TODAY(). "dddd")). This formula works for TODAY but at 7 PM in the evening it automatically moves to the next day when I upload my PBIX file to Power BI Services. It has something to do with UTC NOW function.

So I am trying to extract WEEKDAY Today's Day (Monday) 12/24/2018 and Last Year's Day (Sunday) 12/24/2017

My database has these fields. (Order Date, Location, Year, Month, Units Sold)

Thanks for your help

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: DAX Weekday Name UTC Current Year Today and Last Year Today

HI @sureshsonti,

According to your formula, I can confirm your formula is try to get the last year number and format it as day of week.

I'd like to suggest you try to use following formula to get correct day of week of last year same day.

```Last Year Weekday Name as of Today =
UPPER (
FORMAT (
DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) ),
"dddd"
)
)
```

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

For learning resources/Release notes, please visit: | |
4 REPLIES 4
Super User

## Re: DAX Weekday Name UTC Current Year Today and Last Year Today

Hi,

Try thid

=UPPER(TEXT(EDATE(TODAY(),-12),"dddd"))

Hope this helps.

Regular Visitor

## Re: DAX Weekday Name UTC Current Year Today and Last Year Today

Ashish

The first formula worked for me, ( Current Year Weekday Name as of Today = UPPER(FORMAT(TODAY(), "dddd")) but because of UTC NOW now it is showing TUESDAY instead of MONDAY. My Power BI Desktop still shows MONDAY. I have attached an image of the Power BI Service screenshot. I am looking for a formula that will still show MONDAY till 11.59 PM of 12/24/2018 and should change to TUESDAY after 12.00 AM

Last Year Weekday Name as of Today = UPPER(FORMAT(YEAR(TODAY())-1, "dddd"))   (This formula worked for Last Year Weekday Name

Community Support Team

## Re: DAX Weekday Name UTC Current Year Today and Last Year Today

HI @sureshsonti,

According to your formula, I can confirm your formula is try to get the last year number and format it as day of week.

I'd like to suggest you try to use following formula to get correct day of week of last year same day.

```Last Year Weekday Name as of Today =
UPPER (
FORMAT (
DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) ),
"dddd"
)
)
```

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

For learning resources/Release notes, please visit: | |
Regular Visitor

## Re: DAX Weekday Name UTC Current Year Today and Last Year Today

Mr. Sheng,

You are absolutely right. Your formula worked. Thanks for your help. You are awesome

## Helpful resources

Announcements

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

#### Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 294 members 3,499 guests
Recent signins:
Please welcome our newest community members: