Forum Discussion

lgo's avatar
lgo
Frequent Visitor
4 years ago

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

  • 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