Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
WOLFIE
Helper I
Helper I

Concatenating 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] ) ),
        ", "
    )
)

 

WOLFIE_0-1707209296989.png

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.

WOLFIE_0-1707215168516.png

 

 

1 ACCEPTED SOLUTION
amustafa
Solution Sage
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()
)

 

amustafa_0-1707225082084.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
amustafa
Solution Sage
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()
)

 

amustafa_0-1707225082084.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@amustafa Thank you so much! 🙂

amustafa
Solution Sage
Solution Sage

Try this...

 

IF (
    HASONEVALUE ( 'Models'[ModelNumber] ),
    CONCATENATEX (
        FILTER (
            ALLSELECTED ( 'Models'[ModelNumber] ),
            'Models'[ModelNumber] <= SELECTEDVALUE ( 'Models'[ModelNumber] )
        ),
        CALCULATE ( SELECTEDVALUE ( Data[TextColumn] ) ),
        ", "
    )
)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you @amustafa. Unfortunately this doesn't work I have created sample data and how it should look like

 

WOLFIE_0-1707215090879.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.