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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Converting a daily variable into a weekly variable

Hi,

 

At the moment I have a variable with daily granularity, however, I need to get track it on a weekly basis.

 

Is there any way to do this? Is there a way to add week in the Date Hierarchy?

 

 

Thanks in advance,

 

IC

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Maybe this article would be a good place to start? 
https://www.jetglobal.com/blog/working-with-weeks-in-power-bi/

 

View solution in original post

2 REPLIES 2
PattemManohar
Community Champion
Community Champion

@Anonymous  Yes, you can have a WeekStarting or WeekEnding date in the date hierarchy. 

For example, Considering Friday as WeekEndingDate of the business you can add a column to your date dimension as below in SQL.

 

case
when datepart(dw, date) = 7 then dateadd(day, 6, date)
else dateadd(day, 6 - datepart(dw, date), date)
end




Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Anonymous
Not applicable

Hi @Anonymous ,

 

Maybe this article would be a good place to start? 
https://www.jetglobal.com/blog/working-with-weeks-in-power-bi/

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.