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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors