cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frivik Regular Visitor
Regular Visitor

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

Accepted Solutions
Super User
Super User

Re: Combining year and week to a unique ID

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

 


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

Proud to be a Datanaut!


3 REPLIES 3
Super User
Super User

Re: Combining year and week to a unique ID

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

 


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

Proud to be a Datanaut!


Re: Combining year and week to a unique ID

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

 

201701 (week 1 of 2017)

201702 (week 2 of 2017)

etc

 

?

 

Thx,

Scott

Highlighted
Frivik Regular Visitor
Regular Visitor

Re: Combining year and week to a unique ID

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