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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Combining year and week to a unique ID

Hi guys, and thank you for all the great help this community offers. 

 

I've ran into a little issue. I need to comine two collumns containing year and week into one uniqe number. A global week number if you like. E.g the first week will need to have the uniqe ID of 1, next week 2 and so on. As i'm using the number at a later stage it needs to remain a value. 

 

Any suggestions for solutions? 

 

 

Cheers! globalweek.PNG

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

I actually created this once and put it in the Quick Measure gallery as "Sequential"

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Sequential/m-p/380231

 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Maybe just (year * 100) + week, so you get values like:

 

201701 (week 1 of 2017)

201702 (week 2 of 2017)

etc

 

?

 

Thx,

Scott

Greg_Deckler
Super User
Super User

I actually created this once and put it in the Quick Measure gallery as "Sequential"

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Sequential/m-p/380231

 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thank you! Great that you also include the Power Bi file so it can easily be studied! 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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