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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Automate new WeekID, New stardate of week and YearWeek

Hi everyone,

 

I want to automate that excel. In my power bi i have the information of the yellow columns, i need to generate id.

 

Gustavo98_0-1660963205853.png

 

meanwhile i have been refreshing that excel manually.

 

I dont know how to do this process inside power bi.

 

Maybe with VALUES formula, but when i tried that my column "AñoSem" was incorrectly ordered.

 

I hope someone can help me 😉

 

 

9 REPLIES 9
KT_Bsmart2gethe
Impactful Individual
Impactful Individual

Hi @Anonymous ,

 

@Vijay_A_Verma 's solution will give you want. However, if it crosses multiple years, then you can add one additional function to it:

Date.Year(Inicio Semana]) & " - " & Date.WeekOfYear([Inicio Semana])

 

 

Regards

KT

Anonymous
Not applicable

Ty vry much

 

I have done what you said but im getting the an error:

 

Gustavo98_0-1661693538365.png

It looks like pbi does not recongnize the formula.

 

 

Regards.

 

Hi @Anonymous ,

 

My apology, I should have added Text.From():

Text.From(Date.Year(Inicio Semana])) & " - " & Text.From(Date.WeekOfYear([Inicio Semana]))

 

Regards

KT

Anonymous
Not applicable

Appears that Text.From is not a function.

 

Maybe because im not using the latest version of pbi??

 

Ty vry much for helping me

Anonymous
Not applicable

Dont worry.

 

Ty vry much, im going to try that in a moment.

 

Regards

Hi @Anonymous ,

Has your problem solved by @KT_Bsmart2gethe 's solution? If so, please consider accept the helpful reply as solution. Then we are able to close the thread. More people who have the same requirment will find the solution quickly and benefit here.

 

Best Regards,
Community Support Team _ kalyj

v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Has your problem solved by @Vijay_A_Verma 's solution? If so, please consider accept the helpful reply as solution. Then we are able to close the thread. More people who have the same requirment will find the solution quickly and benefit here.

If not, could you please explain more about the desired result.

 

Best Regards,
Community Support Team _ kalyj

Vijay_A_Verma
Super User
Super User

Use one of the below formulas for Week ID

= Date.WeekOfYear([Inicio Semana])
OR
= if Date.WeekOfYear([Inicio Semana]) > 52 then 1 else Date.WeekOfYear([Inicio Semana])

 

Anonymous
Not applicable

Ty for responding,

 

I have more than a year of data, i want that "YearID" column provide me the posibility of values higher than 52. 

 

Best regards 

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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 Kudoed Authors