The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
79 | |
73 | |
46 | |
39 |
User | Count |
---|---|
135 | |
109 | |
69 | |
64 | |
55 |