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

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.

Reply
Midguel
Helper I
Helper I

Concatenate SUM of values

Hi! I asked this in respond of other post but i think is worth to create a new one, I'm trying to reach a new calculated column like the last one of the image:

concat.PNG

I'm trying to create a list for every "OP" with the concatenate of "EE" and in parenthesis the sum of "tns" whenever the OP, EE and the Date are the same, the tricky part it's that in my source I have other columns like "lingado" that makes my table more repetitive.

With this I'm trying to reach a visual like this one:

concat2.PNG

Please help, any help would very much appreciate, thank you!!

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Midguel , Try a measure like

measure =
var _tab = summarize(Table, table[OP], Table[EE], "_1", sum(Table[tns]))
return
concatenatex(_tab, EE & "(" & _1 & ")")

 

Display with OP

 

View solution in original post

Hi @Midguel ,

 

Try this as a Calculated COlumn

 

CCEPCol =
VAR summtab =
    CONCATENATEX (
        FILTER (
            SUMMARIZE (
                'Table10',
                Table10[Date],
                Table10[OP],
                Table10[EE],
                "TNS", SUM ( Table10[TNS] )
            ),
            Table10[Date]
                = EARLIER ( Table10[Date] )
                && Table10[OP]
                    = EARLIER ( Table10[OP] )
        ),
        Table10[EE] & "(" & [TNS] & ")",
        ","
    )
RETURN
    summtab

 

1.jpg

 

 

 

Regards,
Harsh Nathani

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

 

 

View solution in original post

4 REPLIES 4
Midguel
Helper I
Helper I

thanks! @harshnathani @amitchandak , both worked pretty well, i was thinking if there's a way to make this in a calculated column? instead of a measure, because i wanted to take this column in a matrix as a row and i can not reach that with a measure, again thanks for your help.

Hi @Midguel ,

 

Try this as a Calculated COlumn

 

CCEPCol =
VAR summtab =
    CONCATENATEX (
        FILTER (
            SUMMARIZE (
                'Table10',
                Table10[Date],
                Table10[OP],
                Table10[EE],
                "TNS", SUM ( Table10[TNS] )
            ),
            Table10[Date]
                = EARLIER ( Table10[Date] )
                && Table10[OP]
                    = EARLIER ( Table10[OP] )
        ),
        Table10[EE] & "(" & [TNS] & ")",
        ","
    )
RETURN
    summtab

 

1.jpg

 

 

 

Regards,
Harsh Nathani

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

 

 

harshnathani
Community Champion
Community Champion

Hi @Midguel ,

 

Solution already posted but responding since was working on the solution.

 

You can also try

 

CCEPMeasure = 
var summtab = 
CONCATENATEX(

    SUMMARIZE('Table10',Table10[Date], Table10[EE],"TNS" , SUM(Table10[TNS])),Table10[EE] & "(" & [TNS] & ")",",")

RETURN
summtab

 

 

Regards,

Harsh Nathani

amitchandak
Super User
Super User

@Midguel , Try a measure like

measure =
var _tab = summarize(Table, table[OP], Table[EE], "_1", sum(Table[tns]))
return
concatenatex(_tab, EE & "(" & _1 & ")")

 

Display with OP

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors