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! Request now

Reply
ctedesco3307
Resolver II
Resolver II

Concat Date Column to show in correct week order

Hello All: 

 

I have a calculated column in my calendar table that adds from and  to the Start an End Date

RepWeek = "From"&" "&TDate[WeekStartDate]&" "&"To"&" "&TDate[WeekEndDate]

For the visual (matrix). How can I make it show in the right date order by week?  

Thanks in advance!! 

 

ctedesco3307_0-1634836913991.png

ctedesco3307_1-1634836922512.png

 

 

3 ACCEPTED SOLUTIONS

Greg_Deckler_0-1634925220915.png

@ctedesco3307 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

@ctedesco3307 According to your image, you need to sort RepWeek by Week I am thinking. It looks like you are setting sort by on TDate and not sure why.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

@ctedesco3307 OK, so I have week starting and ending measures: Week Starting - Microsoft Power BI Community

 

Those are pretty long and complicated though so let's see if we can create better ones: 

WeekStartDate = TDate[Date] -  (WEEKDAY(TDate[Date],1) -1)
WeekEndDate = WeekStartDate + 6

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

11 REPLIES 11
ctedesco3307
Resolver II
Resolver II

@Greg_Deckler  - that's what I was looking for but I couldn't find the option to do that. Where is it? thx. 

Greg_Deckler_0-1634925220915.png

@ctedesco3307 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler well duh, I should have found that ... thank you but it didn't work for me. 

ctedesco3307_0-1634925872006.png

 

@ctedesco3307 Did you get an error?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  no error, it just doesn't work. look at my pic in last post - the dates are still out of order 

thx

@ctedesco3307 According to your image, you need to sort RepWeek by Week I am thinking. It looks like you are setting sort by on TDate and not sure why.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

 @Greg_Deckler  Ah! Ok – so when I do that I do get an error, which is this:

ctedesco3307_0-1634990930590.png

 

Looking into it – it looks like my formula to set the WeekStartDate and WeekEndDate isn’t working right.  What those 2 columns are supposed to show, is the Sunday(WeekStartDate) and Saturday(WeekEndDate) for the Date column

Here are my formulas – it looks like when Date is Sunday the formula calculates the prior Sunday

WeekStartDate = TDate[Date] -  WEEKDAY(TDate[Date],2)

WeekEndDate = TDate[Date] -  WEEKDAY(TDate[Date],2)+6

ctedesco3307_1-1634990969453.png

 

 

@ctedesco3307 OK, so I have week starting and ending measures: Week Starting - Microsoft Power BI Community

 

Those are pretty long and complicated though so let's see if we can create better ones: 

WeekStartDate = TDate[Date] -  (WEEKDAY(TDate[Date],1) -1)
WeekEndDate = WeekStartDate + 6

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler This worked! thank you so much for your patience- this is exactly what I was looking for. I appreciate all your help here!  

ctedesco3307_0-1635006824362.png

 

 @Greg_Deckler  Ah! Ok – so when I do that I do get an error, which is this:

ctedesco3307_0-1634990930590.png

 

Looking into it – it looks like my formula to set the WeekStartDate and WeekEndDate isn’t working right.  What those 2 columns are supposed to show, is the Sunday(WeekStartDate) and Saturday(WeekEndDate) for the Date column

Here are my formulas – it looks like when Date is Sunday the formula calculates the prior Sunday

WeekStartDate = TDate[Date] -  WEEKDAY(TDate[Date],2)

WeekEndDate = TDate[Date] -  WEEKDAY(TDate[Date],2)+6

ctedesco3307_1-1634990969453.png

 

 

Greg_Deckler
Community Champion
Community Champion

@ctedesco3307 Well, you would need to use a Sort By column. You could likely use a WEEKNUM column for that.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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