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.
Hi all!
My dataset, which cannot be changed has two seperate columns to describe date; one [week] and one [year]. As the dataset spans over several years this naturally causes quite a bit of issues when trying to filter the data.
Is there any way to use power query to make the two columns into a new one which power bi will recognize as a validdate?
Making date into the first day of week would be perfectly acceptable.
Br
Frivik
Solved! Go to Solution.
Add custom column Date with formula
=Date.StartOfWeek(Date.AddDays(#date([year],1,1),([week]-1)*7),Day.Monday)
#date([year],1,1) returns January 1st of the [year],
then you add 7 days for each week using Date.AddDays
then you get first day of week using Date.StartOfWeek
Add custom column Date with formula
=Date.StartOfWeek(Date.AddDays(#date([year],1,1),([week]-1)*7),Day.Monday)
#date([year],1,1) returns January 1st of the [year],
then you add 7 days for each week using Date.AddDays
then you get first day of week using Date.StartOfWeek
And you sir are a genious. Thanks for helping out a newbie!
Enjoy your weekend.
Best regards
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.