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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
lgo
Frequent Visitor

How to sum columns with dynamic title (based on ranges + text)

How to sum columns with dynamic title (based on ranges + text)

 

So far i am trying to sum up two columns, which name is composed by dynamic range + an extra text at the end:

 

dynamic range1= commodity

dynamic range2=country1=export country

extra text= "ATL A" and "PAC A"

 

so far i have tried this (extrated text from ranges): 

 

#"Created column2" = Table.AddColumn(#"Created column1, "column name", each Text.From(Country1)&" "&Text.From(Commodity)&"ATL A" + Text.From(Country1)&" "&Text.From(Commodity)&" E PAC A", type number),

 

i also tried to name the ranges inside the brackets:

 

#"Created column2" = Table.AddColumn(#"Created column1, "column name", each [Country1 Commodity ATL A] + [Country1 Commodity PAC A], type number),

 

but does not worked so far. I can't think about anything else. Could somebody help on this? thank you a lot!!!!!!!

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @lgo 

Can you please provide a snapshot of your data and column names.  And an example of the results you expect.  Hard to visual all of this just in text.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.