cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Bug in the Calculation of Date

Dear Power BI team,
 
Prev Week =
Var CurrenDate = MAX('Date C'[Date])
VAR PrevDate = DATE(YEAR(CurrenDate), MONTH(CurrenDate), DAY(CurrenDate)-7)
Return PrevDate
 
Since this week the function doesn't work.
I assume the reason is that the current date Date is this month (2020-06-07) and previous week last month (2020-05-31).
Therefore it didn't calculate the previous date, before it was recognized automatically.
 
Best,
Liudmila
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
New Member

Solved. Now it is just MAX('Date C'[Date]) - 7 😉

View solution in original post

1 REPLY 1
Highlighted
New Member

Solved. Now it is just MAX('Date C'[Date]) - 7 😉

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors