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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Usha_pk
Helper II
Helper II

How to create a Date column using Year and week combination

Hi team,

Can you please help me how to create a date column using year and week in powerbi. Thank you!

@Ritaf1983 @Greg_Deckler @amitchandak @Ashish_Mathur @parry2k @MFelix 

4 REPLIES 4
v-rongtiep-msft
Community Support
Community Support

Hi all,

First of all, thank you all for your prompt responses.

Hi @Usha_pk ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

Add a custom column.

Date.StartOfWeek(Date.AddWeeks(#date([Year], 1, 1), [Week]-1))

vrongtiepmsft_0-1717380813287.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I agree 100%. That's why I asked what he or she means, specifically, by "week", also what the expected result is.

 

If for example he or she wants the last day of that week, and [week] is, let's say, a 0-indexed weeknum value essentially equal to FLOOR(DIVIDE(julian date, 7), 1) etc.

 

Then [YEAR] 2024 and [WEEK] 0 could mean January 7,2024.

 

I'm hoping for some more clarity and sample data from @Usha_pk 

kpost
Super User
Super User

Please define more clearly what you mean by "week" (it can mean a lot of different things), and provide a screenshot of some sample data.

 

Then tell us what the expected result is, based on those two columns.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.