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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
cchilton
Helper I
Helper I

Change Start of Week Day Dynamically

Hello, 

 

Context: Our organization is building an application that incorporates Power BI analytics. Our customers are from different companies that start their work week on a different day. 

 

Issue: I am unable to dynamically change the start day of the work week based on the company selected. 

 

Data design:

cchilton_0-1683561910221.png

 

What I have tried:
- I created a new date column to manipulate the start day of the work week based on the company selected. Please see below 

DAX
cchilton_1-1683562765356.png

Result (does not work as expected) 

cchilton_2-1683563066211.png

DAX hard coded (works as expected) 

cchilton_3-1683563177898.png

Desired Result (this should change based on the company selected) 

 

cchilton_4-1683563262354.png

 

*Note: 

The numbers 1 - 7 represent the start day of the week. Where 1 = Sunday and 7 = Saturday. I found that if I add 1, 2, 3 days etc to VAR RESULT  I get the desired output. The issue is that the variable "StartOfWkConversion" does not work as expected. The work week is always Sunday - Saturday. 

 

Does anyone have a good solution to this problem? I am fairly new to DAX. This is the best solution I could come up with thus far. 

 

 

 



2 REPLIES 2
Muhammad110
Advocate I
Advocate I

So the thing is, your customers come from different companies, and each company starts their work week on a different day. Now, you want to dynamically change the start day of the work week based on the selected company.

 

So in your data model, make sure you have a column that tells the start day of the work week for each company. This could be a separate column in your company table or maybe a relationship with a calendar table. You know, whatever works for you. 

 

then use the below measure 

 

Dynamic Start Day =
SWITCH (
SELECTEDVALUE ( CompanyTable[Company] ),
"Company A", CompanyTable[StartDay_A],
"Company B", CompanyTable[StartDay_B],
"Company C", CompanyTable[StartDay_C],
)

Thank you for your prompt reply. This works. In fact, I tried this method as well. The issue is that when I add it to my "DateNew" column the switch statement returns blank so it does not work for my purposes. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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