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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
jmfillman
Helper I
Helper I

Dynamic Column Reference in Sum.List

This first formula works, but I am trying to remove the hard column reference ([FY24 Original Baseline]) to a dynamic reference from a varible:

 

List.Sum(Table.SelectRows(tbl_DSBaselines,

(InnerTable) => InnerTable[FinancialID] = [FinancialID] and

InnerTable[Baseline Version] = Text.Combine({FiscalYear,"Q0"}))[FY24 Original Baseline]

)

 

Does not work (returns a List) and I cannot figure out the correct syntax to accomplish this. Table.Column is clearly not correct.

 

FiscalYearBaseline is the variable containing the column name I want to reference.

 

List.Sum(Table.SelectRows(tbl_DSBaselines,

(InnerTable) => InnerTable[FinancialID] = [FinancialID] and

InnerTable[Baseline Version] = Text.Combine({FiscalYear,"Q0"})){Table.Column(tbl_DSBaselines,FiscalYearBaseline)}

)

1 ACCEPTED SOLUTION
jgordon11
Resolver II
Resolver II

List.Sum(Table.Column(Table.SelectRows(tbl_DSBaselines, (InnerTable) => InnerTable[FinancialID] = [FinancialID] and InnerTable[Baseline Version] = Text.Combine({FiscalYear,"Q0"})), FiscalYearBaseline))

View solution in original post

1 REPLY 1
jgordon11
Resolver II
Resolver II

List.Sum(Table.Column(Table.SelectRows(tbl_DSBaselines, (InnerTable) => InnerTable[FinancialID] = [FinancialID] and InnerTable[Baseline Version] = Text.Combine({FiscalYear,"Q0"})), FiscalYearBaseline))

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.

Top Solution Authors