Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hey everyone,
I have a problem where i need to combine an unknown number of strings.
I have a Sales table. For every sale i have an unknown number of Sales Lines connected to it.
On these Sales Lines there is a description field. I need a measure or calculated column that can run through these descriptions and give me a single string back on a new Column at Sales like this:
Sales No | Description
___________|_______________________
123 | "Description 1,
| Description 2,
| Description nth"
__________|________________________
234 | "Description 1"
__________|________________________
So in short it has to work with different number of strings for each row.
Please comment if you require more info
Solved! Go to Solution.
@Anonymous
Try this MEASURE
Measure = CONCATENATEX ( VALUES ( Table1[Description] ), [Description], ", ", [Description] )
@Anonymous
Try this MEASURE
Measure = CONCATENATEX ( VALUES ( Table1[Description] ), [Description], ", ", [Description] )
This doesn't work so i'll clarify a bit futher
I have a table Sales.
For each Sale there are an unknown number of Sales Lines which have a column "Description".
I need to Concatenate all the Descriptions from the Sales Lines that are connected to that Sale and get that as a column (or measure) on the Sales table. So i need to filter it somehow.
With that method you posted it Concatenates ALL the descriptions of all Sales Lines for each Sale.
@Anonymous
Does your Table look like this
Sales No Description
123 | 4 |
123 | 3 |
123 | 2 |
123 | 5 |
234 | 107 |
234 | 108 |
234 | 100 |
That is correct.
On another table Sales i have the Header for the Sales lines (123, 234). And on this table i'd like another column where all the descriptions are concatenated together. but only for the right Sales No.
@Anonymous
Then the MEASURE I provided should work
Please see attached file
Probably you added it as a calculated column
It does work.
I made a rookie mistake. Because i had so many descriptions it chose to cover the entire page with the Total, so i couldn't see the individual lines.
I will mark it as solved with the Measure you posted at first. 😄
User | Count |
---|---|
126 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |