Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
My data source is creating three separate columns, for Year, Month, Day, each recognized as a whole number.
I am looking for a simple statement that allows me to concatenate these elements and format as a date.
Appreciate all of the help from the PBI community.
Thanks!
Solved! Go to Solution.
One solution could be combining them together in Power Query and then transforming the column to type date.
If you go to advanced editor in query editor and add these lines:
CombinedYMD = Table.CombineColumns(Table.TransformColumnTypes(#"Previous Step", {{"month", type text}, {"day", type text}, {"year", type text}}, "en-US"),{"month", "day", "year"},Combiner.CombineTextByDelimiter("/", QuoteStyle.None),"Date"), CombinedYMDtoDate = Table.TransformColumnTypes(CombinedYMD, {{"Date", type date}}) in CombinedYMDtoDate
Replacing "#"Previous Step"" with the previous step's name in your query and month/day/year by your column names, it should work.
This looks like heavy lifting for a newbie.
Any other suggestions for a simple DAX statement?
the simple statement could be DATE function:
What if the month columns are month names, not number?? (January, February, March...)
I cannot get it to recognize DateFormat. Any suggestions?
Hi,
Share some data and show the expected result.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.