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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
jbuck2020
Helper I
Helper I

Need to generate a column with the first day of the week listed in each row

I have a table that looks like this with weeks starting on Tuesday and ending on Monday:

 

DateWeekNumberDay of Week Number
10/17/20211471
10/18/20211472
10/19/20211473
10/20/20211474
10/21/20211475
10/22/20211476
10/23/20211477
10/24/20211481
10/25/20211482
etcetcetc

 

I'm trying to generate a new column that shows the date from day 1 column above on each row.

 

Date

WeekNumberDay of Week NumberWeekStartDate

10/17/2021

147110/17/2021
10/18/2021147210/17/2021
10/19/2021147310/17/2021
10/20/2021147410/17/2021
10/21/2021147510/17/2021
10/22/2021147610/17/2021
10/23/2021147710/17/2021
10/24/2021148110/24/2021
10/25/2021148210/24/2021
etc   

 

I've tried several dax calculations but they all seem to end in the following error message: "a single value for column "date" in table "Calendar" cannot be determined."


Any ideas why this might be happening and/or how to add this WeekStartDate column?

1 ACCEPTED SOLUTION

The most likely reason is that you are trying to define a measure instead of a calculated column. You'll definitely get that error if you try to define a measure that way but not for a calculated column.

View solution in original post

4 REPLIES 4
AlexisOlson
Super User
Super User

How about this as a calculated column?

 

WeekStart = Table1[Date] - Table1[Day of Week Number] + 1

Still getting the "A single value for column 'Date' in table 'Calendar' cannot be determined. This can happen when a measure formula refers to a columnj that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result." error

The most likely reason is that you are trying to define a measure instead of a calculated column. You'll definitely get that error if you try to define a measure that way but not for a calculated column.

That was it! Thanks!

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors