Forum Discussion
WOLFIE
Helper I
2 years agoConcatenating value from the previous row
Hi,
Could you please help to amend this measure to concatenate text rather than integers? Thank you
=
IF (
HASONEVALUE ( 'Models'[ModelNumber] ),
CONCATENATEX (
FILTER (
ALLSELECTED ( 'Models'[ModelNumber] ),
'Models'[ModelNumber] <= SELECTEDVALUE ( 'Models'[ModelNumber] )
),
CALCULATE ( SUM ( Data[Val1] ) ),
", "
)
)
I have created sample data and how it should look like. I need it concatenated with each new date and value, but only for group A. The measure doesn't work.
Here you go...
ConcatDescriptions = VAR CurrentDate = 'Table'[Date] VAR FilteredTable = FILTER( ALL('Table'), 'Table'[Group] = "A" && 'Table'[Date] <= CurrentDate ) RETURN IF( 'Table'[Group] = "A", CONCATENATEX( FilteredTable, 'Table'[Description], ", " ), BLANK() )
4 Replies
- amustafa
Solution Sage
Try this...
IF ( HASONEVALUE ( 'Models'[ModelNumber] ), CONCATENATEX ( FILTER ( ALLSELECTED ( 'Models'[ModelNumber] ), 'Models'[ModelNumber] <= SELECTEDVALUE ( 'Models'[ModelNumber] ) ), CALCULATE ( SELECTEDVALUE ( Data[TextColumn] ) ), ", " ) ) - amustafa
Solution Sage
Here you go...
ConcatDescriptions = VAR CurrentDate = 'Table'[Date] VAR FilteredTable = FILTER( ALL('Table'), 'Table'[Group] = "A" && 'Table'[Date] <= CurrentDate ) RETURN IF( 'Table'[Group] = "A", CONCATENATEX( FilteredTable, 'Table'[Description], ", " ), BLANK() )