@Keith good points thanks for providing support 
Hi @ysherriff,
I found some redundancy in your code and was able to combine some steps, don’t expect major improvements but see how this goes. Please note that I rewrote this query by hand, therefore I didn’t have any visual indicators. Should you get errors read the message carefully and try to resolve it, else report back with the error message and relevant fields and code in view.
Source = Sql.Database("*******.database.windows.net", "S********9"),
Navigation = Source{[Schema = "dbo", Item = "Contact"]}[Data],
SelCols = Table.SelectColumns(Navigation, {"associatedcompanyid", "email", "firstname", "h01_campaign_interaction_date__c", "h01_most_recent_martech_campaign__c", "horiginal_campaign_interaction_date__c", "horiginal_most_recent_martech_campaign__c", "hs_analytics_source_data_1", "hs_lifecyclestage_marketingqualifiedlead_date", "lastname", "position__c", "suppress_contact"}),
SelRows = Table.SelectRows(SelCols, each ([suppress_contact] = null) and ([hs_analytics_source_data_1] <> "SALESFORCE")),
ChType = Table.TransformColumnTypes(SelRows, {{"hs_lifecyclestage_marketingqualifiedlead_date", type date}, {"h01_campaign_interaction_date__c", type date}, {"horiginal_campaign_interaction_date__c", type date}}),
ReplValues = Table.ReplaceValue(ChType, null, #date(1974, 3, 9), Replacer.ReplaceValue, {"h01_campaign_interaction_date__c", "horiginal_campaign_interaction_date__c"}),
RetrieveRFPDate = Table.NestedJoin(ReplValues, {"email"}, #"RFP Date with Email - Transformation", {"Email"}, "RFP Date with Email", JoinKind.LeftOuter),
ExpandRFPEmail1 = Table.ExpandTableColumn(RetrieveRFPDate, "RFP Date with Email", {"bc_number__c", "global_or_potential", "RFP Received Date"}, {"bc_number__c", "global_or_potential", "RFP Received Date"}),
FilterRFPNoNull = Table.SelectRows(ExpandRFPEmail1, each ([RFP Received Date] <> null)),
AddCalculations = Table.AddColumn(FilterRFPNoNull, "new fields", each
[
rfp date minus horiginal = [RFP Received Date] - [horiginal_campaign_interaction_date__c],
rfp date minus h01 date = [RFP Received Date] - [h01_campaign_interaction_date__c],
horiginal influence time = if #"rfp date minus horiginal" >=0 and #"rfp date minus horiginal" <= 730 then "Y" else "N",
h01 influence time = if #"rfp date minus h01 date" >=0 and #"rfp date minus h01 date" <= 730 then "Y" else "N",
Influence date Logic = if #"horiginal influence time" ="N" and #"h01 influence time" = "N" then "Not Influenced" else if #"horiginal influence time" = "Y" and #"h01 influence time" = "N" then "Horiginal" else if #"horiginal influence time" = "N" and #"h01 influence time" = "Y" then "H01" else if #"horiginal influence time" > #"h01 influence time" then "Horiginal" else "H01"
]
),
ExpandCalculatioins = Table.ExpandRecordColumn( AddCalculations, "new fields", {"rfp date minus horiginal", "rfp date minus h01 date", "horiginal influence time", "h01 influence time", "Influence date Logic" }),
FilterNotInfluenced = Table.SelectRows( ExpandCalculatioins, each ([Influence date Logic] <> "Not Influenced")),
InfluenceCampaign = Table.AddColumn(FilterNotInfluenced, "Influence Campaign", each if[Influence date Logic] = "Horiginal" then[horiginal_most_recent_martech_campaign__c] else [h01_most_recent_martech_campaign__c]), ),
InfluenceTime = Table.AddColumn( InfluenceCampaign, "Influence Time", each if [Influence date Logic] = "Horiginal" then [rfp date minus horiginal] else [rfp date minus h01 date] ),
SetTypes = Table.TransformColumnTypes( InfluenceCampaign, {{"rfp date minus horiginal", Int64.Type}, {"rfp date minus h01 date", Int64.Type}, {"horiginal influence time", type text}, {"h01 influence time", type text}, {"Influence date Logic", type text}, {"Influence Campaign", type text}, {"Influence Time", Int64.Type}}),
#"retrieve campaign id from campaign name" = Table.SplitColumn(SetTypes, "Influence Campaign", Splitter.SplitTextByEachDelimiter({":"}, QuoteStyle.Csv), {"Influence Campaign.1", "Influence Campaign.2"}),
I hope this is helpful