I'm new to Power Query and am struggling learning the syntax.
I need to know the Power Query formula for creating the equivalent of this standard Excel formula:
=AgentId&text(Date,"YYYYMMDD")&hour
Date and Hour are being populated from a field called Period (Date/Time)
Date = int(Period)
Hour = hour(Period)
Custom column would be AgentDateHr = AgentId&Date.ToText(Date,"YYYYMMDD")&hour
Error message says
Expression.Error: We cannot apply operator & to types Text and Number.
Does that mean I need to duplicate Date & Hour columns, convert them to text, and then concatenate them with AgentID.
If so, how do I change the date (currently in m/d/yyyy format) to be "yyyymmdd"?
What would be the simplest way to accomplish all this?
Any help would be appreciated.
I need to know the Power Query formula for creating the equivalent of this standard Excel formula:
=AgentId&text(Date,"YYYYMMDD")&hour
Date and Hour are being populated from a field called Period (Date/Time)
Date = int(Period)
Hour = hour(Period)
Custom column would be AgentDateHr = AgentId&Date.ToText(Date,"YYYYMMDD")&hour
Error message says
Expression.Error: We cannot apply operator & to types Text and Number.
Does that mean I need to duplicate Date & Hour columns, convert them to text, and then concatenate them with AgentID.
If so, how do I change the date (currently in m/d/yyyy format) to be "yyyymmdd"?
What would be the simplest way to accomplish all this?
Any help would be appreciated.