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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
redhughes
Helper II
Helper II

Week 0

Hi,

 

I have appointments data with a column for exact date and a column with "week commencing on..." (i.e. Monday date for that week). What I am hoping to achieve is an extra column that will say 1 and 2 for "future" weeks that I'm reporting on, 0 for the current week, and -1, -2 etc. for weeks in the past. Obviously, this should update every time I am adding new lines of data. When I was using Excel as the source of data, the formula that worked was based on the MAX of the week commencing column, but now I am unsure how to replicate purely in PowerBI.

 

Thanks in advance for all suggestions and advice!

1 ACCEPTED SOLUTION

you can modify the column as 

 

 

WeekCommencingOn = var recentmaxdate = max(appDate) returns WeekNum(apptDate,1) - WeekNum(recentmaxdate ,1)

View solution in original post

5 REPLIES 5
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @redhughes,

 

Did these posts solve your issue?

 

Best Regards,

Dale

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

Yes, thanks!
NipponSahore
Resolver II
Resolver II

You can create a Calculated column as 

 

WeekCommencingOn = WeekNum(apptDate,1) - WeekNum(today(),1)

it could work, but it means week 0 will change based on what "today" is, correct? I'd rather it changed only when I add a new week's data.

you can modify the column as 

 

 

WeekCommencingOn = var recentmaxdate = max(appDate) returns WeekNum(apptDate,1) - WeekNum(recentmaxdate ,1)

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors