The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I am trying to concatenate 2 columns into a single measure and am having issues. I have looked at a few posts but there always seems to be an issue.
For instance. In this post:
https://community.fabric.microsoft.com/t5/Desktop/Concatenate-distinct-values-from-column-in-Measure...
Which seems pretty close to what I want when I try to recreate the measure in my power bi I get the following error.
testing =
CONCATENATEX(
VALUES(Ticket[Info_ID]),
Ticket[Date], ", "
)
A single value for column date in table ticket can't be determined.
When I type "Ticket" to select the 2nd column above it doesn't pull up any ticket columns. If I put "Max" around date it will work. But then returns nothing. When there is data in those fields, I am testing where it I have it filtered down to 1 row each and there is data.
My ultimate goal is to combine these 2 fields (and do some manipulation on date) into 1 measure that can be shown in a table iwth a list of values.
IE:
Info ID | Date | Testing |
1234 | 01/01/2024 | 1234-2024/01/01 |
5678 | 01/02/2024 | 5678-2024/01/02 |
9901 | 01/03/2024 | 9901-2024/01/03 |
Solved! Go to Solution.
Hi @Don-Bot
You can create a measure as follows.
testing = CONCATENATEX(Ticket, Ticket[Info_ID] & "-" & FORMAT(Ticket[Date], "yyyy/mm/dd"))
Is this the result you expect?
For more details about CONCATENATEX and FORMAT function, you can read related document link:
CONCATENATEX function (DAX) - DAX | Microsoft Learn
FORMAT function (DAX) - DAX | Microsoft Learn
Best Regards,
Community Support Team _Yuliax
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Don-Bot
You can create a measure as follows.
testing = CONCATENATEX(Ticket, Ticket[Info_ID] & "-" & FORMAT(Ticket[Date], "yyyy/mm/dd"))
Is this the result you expect?
For more details about CONCATENATEX and FORMAT function, you can read related document link:
CONCATENATEX function (DAX) - DAX | Microsoft Learn
FORMAT function (DAX) - DAX | Microsoft Learn
Best Regards,
Community Support Team _Yuliax
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hello v-xuxinyi-msft, I used your method but all rows ended up concacting into a single value/ row.
Can you explain how to solve this?
Hi @Don-Bot
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523