Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello, I have the below table called remcost which has a uniqueID called ddID.
What I need is based upon the column ddID combine the fields that that have in the column rc-type "labour" into 1 field so it lists each person by the column rc-number (Michael Hegerty, Paul Riley, Stephen Spencer, Matthew Spice) and keeps another column for rc-type "vehicle" which is also in rc-number (EK55 TKJ).
I'm adding these to a table view and want 2 seperate columns for the combined labour and then 1 for the vehicle. and this is all showing by ddID
any help would be appreciated
thanks
Solved! Go to Solution.
Hi @Anonymous
Try the below 2 measures.
MLabour = CONCATENATEX(Table1,IF(Table1[rc-type]="Labour",Table1[rc-number]),",")
MLabour = CONCATENATEX(Table1,IF(Table1[rc-type]="Vehicle",Table1[rc-number]),",")
Its close to your expectation, but leading/ trailing "," are displayed , a little tune will do from here.
Thanks
Raj
Can you please post the expected output in table format for the given sample data?
Also, please post the sample data in copy- pasteable format so that we dont have to type the data again.
Thanks
Raj
Hi Raj, here is what I expect the output to be (I have a few other columns in the output from other tables that hopefully shouldn't cause a problem)
ddID | Labour | Vehicle |
41461 | Michael Hegerty, Paul Riley, Stephen Spencer, Matthew Spice | EK55 TKJ |
and here is the specific columns from the table
ddID | rc-number | rc-type |
41461 | EK55 TKJ | Vehicle |
41461 | Matthew Spice | Labour |
41461 | Stephen Spencer | Labour |
41461 | Paul Riley | Labour |
41461 | Michael Hagerty | Labour |
If this is not what you require please advise. My knowledge of Power BI is not brilliant. Sorry
thanks
Hi @Anonymous
Try the below 2 measures.
MLabour = CONCATENATEX(Table1,IF(Table1[rc-type]="Labour",Table1[rc-number]),",")
MLabour = CONCATENATEX(Table1,IF(Table1[rc-type]="Vehicle",Table1[rc-number]),",")
Its close to your expectation, but leading/ trailing "," are displayed , a little tune will do from here.
Thanks
Raj
Thank you Raj that is perfect
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |