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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors