Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi everyone, i am trying to create a new column in PQ to combine year and quarter.
i tried the below formula but it is giving me error.
Year/Qtr = [Year] & "-" & [Quarter]
can you please help.
i got my year and quarter from the notified column. i used data tab to extract year, month and quarter. but now i cannot combine them.
Solved! Go to Solution.
Hi @Anonymous
You can add a custom column, then try the following code
Text.From([Year])&"-"&Text.From([Quarter])
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
In Power Query, you cannot simply combine number and text data types.
Year and Quarter are number data type and "-" is text data type.
Here is one way of solving your issue. You will treat your numbers as text then you can concatenate them.
Year/Qtr = Number.ToText([Year]) & "-" & Number.ToText([Quarter])
Hi @Anonymous
Along with the answer from @Anonymous you can use the Merge Columns feature in the Transformation Tab.
First Highlight the Year Column then the Quarter Column and press the Merge Column button. You will be prompted to enter a separator and a column name
Thanks
Joe
If this post helps, then please Accept it as the solution
Hi @Anonymous
You can add a custom column, then try the following code
Text.From([Year])&"-"&Text.From([Quarter])
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.