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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
dtango9
Helper II
Helper II

Power Query Formula

Hi!

 

In column AT I'm looking to create a formula that calculates totals from a different table (Leads) that is connected to this query since column AM on the current table?  Any help?  

 

This is how "L12 Leads" column was created:
let
Source = Sql.Databases,
BI = Source{[Name="BI"]}[Data],
dbo_TrueTradeLeadSummaryPlus = BI{[Schema="dbo",Item="TrueTradeLeadSummaryPlus"]}[Data],
#"Added Custom" = Table.AddColumn(dbo_TrueTradeLeadSummaryPlus, "L12 Leads", each [CurrentMonth]+[CurrentMonthMinusOne]+[CurrentMonthMinusTwo]+[CurrentMonthMinusThree]+[CurrentMonthMinusFour]+[CurrentMonthMinusFive]+[CurrentMonthMinusSix]+[CurrentMonthMinusSeven]+[CurrentMonthMinusEight]+[CurrentMonthMinusNine]+[CurrentMonthMinusTen]+[CurrentMonthMinusEleven])
in
#"Added Custom"

 

Power Query Question.jpg

 

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @dtango9 

I'm not very clear about your requirement.

What final result would you like?

the formula seems to sum some columns, are they from the same table?

if not, what relationship among different tables?

 

Best Regards

Maggie

camargos88
Community Champion
Community Champion

Hi @dtango9 ,

 

Check if Power Query is pushing this new column through the database using Folding Query, if yes it's possible that if you have null values, when you combine them you get null as return.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

Hi @dtango9 ,

 

I'm not sure understood (all) the problem(s) you have. But you can start by trying to change the formula in this way(the reference to other table is missing probably):

 

#"Added Custom" = Table.AddColumn(dbo_TrueTradeLeadSummaryPlus, "L12 Leads", each Leads[CurrentMonth]+Leads[CurrentMonthMinusOne]+and so on ...
in
#"Added Custom"

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Users online (5,748)