cancel
Showing results for
Did you mean:
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:

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:

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

2 ACCEPTED SOLUTIONS
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

Learn Power BI - Full Course with Dec-2022, with new DAX functions like Window, Index, Offset !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Formatted Profit and Loss Statement with empty lines
Community Champion

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``````

Regards,
Harsh Nathani

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

4 REPLIES 4
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.

Community Champion

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``````

Regards,
Harsh Nathani

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

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

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

Learn Power BI - Full Course with Dec-2022, with new DAX functions like Window, Index, Offset !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Formatted Profit and Loss Statement with empty lines

Announcements

#### 2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

#### Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

#### 2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors