cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

My queries are running so slowly!

Hi Guys

 

Firstly, huge thanks with all the help you've provided so far. Piecing bits together from other answers has enabled me to get to this point, but now I'm stuck and I'm at my wits end. 

Below is the code I've created so far. And it works, it just takes so long to run (and that's with a much reduced sample file saved as a CSV file). I think it's at the BufferedCaseNo steps. I can't do this in DAX as I need the answer in this dataset to continue with the calculation, however I'm not certain as I'm still relatively new to Power Query. Any suggestions in where I can speed this up, would be greatly received.

 

Thanks!

 

let
    Source = #"1 - Data Table",
    
    //Add in total of the average SEI values for the case, for that division
    //#"Added Sec Tot Avg SEI" = Table.AddColumn(Source, "Sec Total Avg SEI", each let _item = [CaseNo] in List.Sum(Table.SelectRows(Source, each [CaseNo] = _item)[#"Sec Avg Activity SEI"])),
    #"Buffered Table" = Table.Buffer(Source),

    //Running Total
    BufferedCaseNo = List.Buffer(#"Buffered Table"[CaseNo]),
    BufferedValues = List.Buffer(#"Buffered Table"[Sec Avg Activity SEI]),
    RT = Table.FromList(fxSecRunningTotal(BufferedValues, BufferedCaseNo), Splitter.SplitByNothing(), {"RT"}),
    Columns = List.Combine({Table.ToColumns(#"Buffered Table"), Table.ToColumns(RT)}),
    #"Added Running Total 1" = Table.FromColumns(Columns, List.Combine({Table.ColumnNames(#"Buffered Table"), {"Sec Avg Running Total"}})),
    
    //Calculate over/under SEI
    #"Added Over/Under" = Table.AddColumn(#"Added Running Total 1", "Sec OverUnder", each if [Sec Avg Running Total] > [Sec SEI Value] then "Over" else if [Sec Avg Running Total] < [Sec SEI Value] then "Under" else "Equal"),
    #"Changed Type" = Table.TransformColumnTypes(#"Added Over/Under",{{"Sec Total Avg SEI", type number}, {"Sec Avg Running Total", type number}}),
    
    //Calculate remaining balance
    #"Calculate Remaining Balance" = Table.AddColumn(#"Changed Type", "Sec SEI Balance", each [Sec SEI Value] - [Sec Avg Running Total], type number),
    
    //Calculate Final Activity and display in new column
    #"Max Activity Find" = Table.NestedJoin(#"Calculate Remaining Balance", {"CaseNo"}, #"2 - Max Activity Table", {"CaseNo"}, "Max Activity Table", JoinKind.LeftOuter),
    #"Max Activity Display" = Table.ExpandTableColumn(#"Max Activity Find", "Max Activity Table", {"MaxActivity"}, {"MaxActivity"}),
    
    //Max Activity additional SEI value
    //#"Added Conditional Column1" = Table.AddColumn(#"Max Activity Display", "Max Act SEI Value Add", each if [MaxActivity] = [Activity Order] and [Ops OverUnder] = "Under" then [Ops SEI Balance] else if [MaxActivity] = [Activity Order] and [Ops OverUnder] = "Over" then [Ops SEI Balance] else 0)
    
    //New Running Total
    BufferedCaseNo2 = List.Buffer(#"Max Activity Display"[CaseNo]),
    BufferedValues2 = List.Buffer(#"Max Activity Display"[Sec Avg Activity SEI]),
    RT2 = Table.FromList(fxSecRunningTotal(BufferedValues, BufferedCaseNo), Splitter.SplitByNothing(), {"RT2"}),
    Columns2 = List.Combine({Table.ToColumns(#"Max Activity Display"), Table.ToColumns(RT2)}),
    #"Added Running Total 2" = Table.FromColumns(Columns2, List.Combine({Table.ColumnNames(#"Max Activity Display"), {"Sec Avg Running Total2"}})),
    #"Calculate additional value for max activity" = Table.AddColumn(#"Added Running Total 2", "Sec Over SEI Value", each if [Sec OverUnder] = "Over" then ([Sec Avg Running Total2] + [Sec SEI Balance]) - [Sec Avg Activity SEI] else 0),
    
    //Indexes activities within a case and whether they are over or under the SEI for the case. This is to establish additional apportionment values
    #"Added Index to Case and Over/Under" = Table.NestedJoin(#"Calculate additional value for max activity", {"CaseNoActOrderID"}, #"3c - SecOverUnder Index", {"Custom.CaseNoActOrderID"}, "5c - SecOverUnder Index", JoinKind.LeftOuter),
    #"Expanded 5c - SecOverUnder Index" = Table.ExpandTableColumn(#"Added Index to Case and Over/Under", "5c - SecOverUnder Index", {"Custom.Index1"}, {"Sec OverUnder Index"}),
    
    //Ops SEI Value if running total is greater than the total SEI for that case
    #"Handling of SEI when running total is greater than total value" = Table.AddColumn(#"Expanded 5c - SecOverUnder Index", "Custom", each if [Sec OverUnder] = "Over" and [Sec OverUnder Index] = 1 then [Sec Avg Activity SEI] + [Sec SEI Balance] else 0),
    #"Renamed Columns1" = Table.RenameColumns(#"Handling of SEI when running total is greater than total value",{{"Custom", "Sec Over SEI New Value"}}),
    
    //Ops SEI value is under and it's the final activity
    #"Handling of final activity if running total is under total value" = Table.AddColumn(#"Renamed Columns1", "Custom", each if [Sec OverUnder] = "Under" and [Activity Order] = [MaxActivity] then [Sec Avg Activity SEI] + [Sec SEI Balance] else 0),
    #"Renamed Columns2" = Table.RenameColumns(#"Handling of final activity if running total is under total value",{{"Custom", "Sec Under SEI New Value"}}),
    
    //Final Sec SEI Value
    #"Add Sec Final SEI" = Table.AddColumn(#"Renamed Columns2", "Sec Final SEI Value", each if [Sec OverUnder] = "Under" and [Activity Order] <> [MaxActivity] then [Sec Avg Activity SEI] else if [Sec OverUnder] = "Under" and [Activity Order] = [MaxActivity] then [Sec Under SEI New Value] else if [Sec OverUnder] = "Over" and [Sec OverUnder Index] = 1 then [Sec Over SEI New Value] else if [Sec OverUnder] = "Over" and [Sec OverUnder Index] <> 1 then [Sec Over SEI New Value] else 0)
in
    #"Add Sec Final SEI"

 

8 REPLIES 8

Hi @Adam_Payne ,
could be that the reason for this lies in the function for the running total "fxSecRunningTotal". Could you please paste the code for it as well? 

 

Yeah sure:

let
    Source = (values as list, grouping as list) as list =>

let
    GRTList = List.Generate
    ( 
        ()=> [ GRT = values{0}, counter = 0 ],

        each [counter] < List.Count(values),

        each try 
                 if grouping{[counter]} = grouping{[counter] + 1} 
                 then [GRT = [GRT] + values{[counter] + 1}, counter = [counter] + 1]
                 else [GRT = values{[counter] + 1}, counter = [counter] + 1]
        
             otherwise [counter = [counter] + 1]
    ,
        each [GRT]
    )
in
    GRTList
in
    Source

Hi @Adam_Payne ,
yes, that makes sense now: Your running total needs to go through the whole table and has to store each step in there. As you are trying to create a grouped/clustered running total, it would be much better if you would group your table on [CaseNo] and apply the running total function on the resulting partitions. I've described that procedure here:
Memory efficient clustered running total in Power BI – The BIccountant
If your data isn't sorted by CaseNo already, you must omitt the change to "GroupKind.Local".

Thanks for that!

 

OK, i think I understand what this is doing. Do I put this into my main code, or the function for the running total? I think It needs to go into the function fxSecRunningTotal.

It's defintiely running faster (thank you!!), but now I'm getting a couple of errors and I can't figure out how to fix them.

1. It's saying the column 'Sec Total Avg SEI' wasn't found. It's in the source table, and if I was to manually expand the columns, it's in the expandable columns too. Do I need to expand all the columns that I need?

2. The running total column just errors. I think I may have the wrong field selected within the code!

 

fxSecRunningTotal
let
func = (Table as table, SortColumn as text, AmountColumn as text) =>

let
/* Debug parameters
Table = #"4c - Sec Data Table", 
SortColumn = "CaseNo", 
AmountColumn = "Sec Total Avg SEI",
*/

// Sort table and buffer it
    Sorted = Table.Buffer(Table.AddIndexColumn(Table.Sort(Table,{{SortColumn, Order.Ascending}}), "Index",1,1)),
// Select the Columns
    SelectColumns = Table.SelectColumns(Sorted, {SortColumn, AmountColumn, "Index"}),
// Extract Amount column and buffer it
    ExtractAmountColumn = List.Buffer(Table.Column(SelectColumns, AmountColumn)),
// Calculate a list with all running Totals
    RunningTotal = List.Skip(List.Generate( ()=> [ListItem=0, Counter=0]
                                            ,each [Counter] <= List.Count(ExtractAmountColumn)
                                            ,each [ ListItem = ExtractAmountColumn{[Counter]}+[ListItem],
                                                    Counter = [Counter]+1
                                                   ]
                                            ),1),
    ConvertedTable = Table.FromList(RunningTotal, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    ExpandedColumn = Table.ExpandRecordColumn( ConvertedTable, "Column1", {"ListItem", "Counter"}, {"ListItem", "Counter"}),
    MergedQueries = Table.NestedJoin(Sorted,{"Index"}, ExpandedColumn,{"Counter"},"Expanded Column1",JoinKind.LeftOuter),
    Expand = Table.ExpandTableColumn( MergedQueries, "Expanded Column1", {"ListItem"}, {"RunningTotal"}),
    #"Removed Columns" = Table.RemoveColumns(Expand,{"Index"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Removed Columns",{{"RunningTotal", type number}})
in
    #"Changed Type"
3c – SecOverUnder Index
let
    Source = #"1 - Data Table",
    
    #"Buffered Table" = Table.Buffer(Source),

    //Running Total
    #"Group by CaseNo" = Table.Group(#"Buffered Table", {"CaseNo"}, {{"All", each _, type table}}, GroupKind.Local),
    #"Added Running Total 1" = Table.AddColumn(#"Group by CaseNo","Sec Avg Running Total", each fxSecRunningTotal([CaseNo], "CaseNo", "Sec Avg Activity SEI")),

    //Calculate over/under SEI
    #"Added Conditional Column" = Table.AddColumn(#"Added Running Total 1", "Sec OverUnder", each if [Sec Avg Running Total] > [Sec SEI Value] then "Over" else if [Sec Avg Running Total] < [Sec SEI Value] then "Under" else "Equal"),
    #"Changed Type" = Table.TransformColumnTypes(#"Added Conditional Column",{{"Sec Total Avg SEI", type number}, {"Sec Avg Running Total", type number}}),
    #"Sec Avg Running Total" = #"Changed Type"{0}[Sec Avg Running Total]
in
    #"Sec Avg Running Total"

 

Hi @Adam_Payne ,
you might have special characters in your column name?
Please find a file attached where the running total function is working with that column name. Hopefully this will help you detect the error in your file.

Thank you so much. I'm still struggling to make it work. 7 hours so far today! Will keep you posted. 

I'm losing my pateince this this!!!! Where am I going wrong?!! Everything I'm trying seems to take ages to run. I also need to replace all the nulls in the Running Total column with zeros. I tried pulling in Replace Values, but that took ages to run.

 

fxSecRunningTotal

(Table as table, SortColumn as text, AmountColumn as text) =>

let
/* Debug parameters
Table = #"4c - Sec Data Table", 
SortColumn = "CaseNo", 
AmountColumn = "Sec Avg Activity SEI",
*/

// Sort table and buffer it
    Sorted = Table.Buffer(Table.AddIndexColumn(Table.Sort(Table,{{SortColumn, Order.Ascending}}), "Index",1,1)),
// Select the Columns
    SelectColumns = Table.SelectColumns(Sorted, {SortColumn, AmountColumn, "Index"}),
// Extract Amount column and buffer it
    ExtractAmountColumn = List.Buffer(Table.Column(SelectColumns, AmountColumn)),
// Calculate a list with all running Totals
    RunningTotal = List.Skip(List.Generate( ()=> [ListItem=0, Counter=0]
                                            ,each [Counter] <= List.Count(ExtractAmountColumn)
                                            ,each [ ListItem = ExtractAmountColumn{[Counter]}+[ListItem],
                                                    Counter = [Counter]+1
                                                   ]
                                            ),1),
    ConvertedTable = Table.FromList(RunningTotal, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    ExpandedColumn = Table.ExpandRecordColumn( ConvertedTable, "Column1", {"ListItem", "Counter"}, {"ListItem", "Counter"}),
    MergedQueries = Table.NestedJoin(Sorted,{"Index"}, ExpandedColumn,{"Counter"},"Expanded Column1",JoinKind.LeftOuter),
    Expand = Table.ExpandTableColumn( MergedQueries, "Expanded Column1", {"ListItem"}, {"RunningTotal"}),
    #"Removed Columns" = Table.RemoveColumns(Expand,{"Index"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Removed Columns",{{"RunningTotal", type number}})
in
    #"Changed Type"

1 - Data Table

let
    Source = Table.NestedJoin(#"0d - Staging", {"Activity"}, #"0e - AVG", {"Activity"}, "2 - AVG", JoinKind.LeftOuter),
    #"Expanded 2 - AVG" = Table.ExpandTableColumn(Source, "2 - AVG", {"Ops", "MT", "Sec"}, {"Ops", "MT", "Sec"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded 2 - AVG",{{"Ops", "Ops Avg Activity SEI"}, {"MT", "MT Avg Activity SEI"}, {"Sec", "Sec Avg Activity SEI"}}),
    
    //Sort rows by case number and activity order, then remove top two rows as blank
    #"Sorted Rows" = Table.Sort(#"Renamed Columns",{{"CaseNo", Order.Ascending}, {"Activity Order", Order.Ascending}}),
    #"Inserted CaseNoActOrderID" = Table.AddColumn(#"Sorted Rows", "CaseNoActOrderID", each Text.Combine({[CaseNo], Text.From([Activity Order], "en-GB")}, ":"), type text),
    #"Reordered Columns" = Table.ReorderColumns(#"Inserted CaseNoActOrderID",{"AC", "CaseNo", "HighestCaseType", "FCCCreatedDate", "Activity", "Activity Order", "CaseNoActOrderID", "Ops SEI Value", "MT SEI Value", "Sec SEI Value", "Ops Avg Activity SEI", "MT Avg Activity SEI", "Sec Avg Activity SEI"}),
    
    //Add in total of the average SEI values for the case, for that division
    #"Added Ops Tot Avg SEI" = Table.AddColumn(#"Reordered Columns", "Ops Total Avg SEI", each let _item = [CaseNo] in List.Sum(Table.SelectRows(#"Reordered Columns", each [CaseNo] = _item)[#"Ops Avg Activity SEI"])),
    #"Added MT Tot Avg SEI" = Table.AddColumn(#"Added Ops Tot Avg SEI", "MT Total Avg SEI", each let _item = [CaseNo] in List.Sum(Table.SelectRows(#"Reordered Columns", each [CaseNo] = _item)[#"MT Avg Activity SEI"])),
    #"Added Sec Tot Avg SEI" = Table.AddColumn(#"Added MT Tot Avg SEI", "Sec Total Avg SEI", each let _item = [CaseNo] in List.Sum(Table.SelectRows(#"Reordered Columns", each [CaseNo] = _item)[#"Sec Avg Activity SEI"]))
in
    #"Added Sec Tot Avg SEI"

 2 - Max Activity Table

let
    Source = #"1 - Data Table", 
    
    #"Buffer Table" = Table.Buffer(Source),
    #"Grouped Rows" = Table.Group(#"Buffer Table", {"CaseNo"}, {{"MaxActivity", each List.Max([Activity Order]), type nullable number}})
    
in
    #"Grouped Rows"

3c - Sec OverUnder Index

let
    Source = #"1 - Data Table",
    #"Buffered Table" = Table.Buffer(Source),
 
//  Calculate Running Total
    #"Grouped Rows" = Table.Group(#"Buffered Table", {"CaseNo"}, {{"All", each _, type table [Column1=nullable text, Sec Avg Activity SEI=nullable number, Date=nullable date]}}),
    #"Invoked Custom Function" = Table.AddColumn(#"Grouped Rows", "fxSecRunningTotal", each fxSecRunningTotal([All], "CaseNo", "Sec Avg Activity SEI")),
    #"Expanded fxSecRunningTotal1" = Table.ExpandTableColumn(#"Invoked Custom Function", "fxSecRunningTotal", {"AC", "CaseNo", "HighestCaseType", "FCCCreatedDate", "Activity", "Activity Order", "CaseNoActOrderID", "Sec SEI Value", "Sec Avg Activity SEI", "Sec Total Avg SEI", "Sec Avg Running Total"}, {"AC", "CaseNo.1", "HighestCaseType", "FCCCreatedDate", "Activity", "Activity Order", "CaseNoActOrderID", "Sec SEI Value", "Sec Avg Activity SEI", "Sec Total Avg SEI", "Sec Avg Running Total"}),

//  Replace Nulls with zeros
    #"Replaced Value" = Table.ReplaceValue(#"Expanded fxSecRunningTotal1",null,0,Replacer.ReplaceValue,{"Sec Avg Running Total"}),

//  Remove 'All' Column as not required
    #"Remove All Column" = Table.RemoveColumns(#"Replaced Value",{"All"}),

//  Change data types to numbers
    #"Changed Type" = Table.TransformColumnTypes(#"Remove All Column",{{"Sec SEI Value", type number}, {"Sec Avg Activity SEI", type number}, {"Sec Total Avg SEI", type number}, {"Sec Avg Running Total", type number}}),

//  Calculate over/under SEI
    #"Add OverUnder" = Table.AddColumn(#"Changed Type", "Sec OverUnder", each if [Sec Avg Running Total] > [Sec SEI Value] then "Over" else if [Sec Avg Running Total] < [Sec SEI Value] then "Under" else "Equal"),

//  Group OverUnder by Case
    #"Grouped Rows1" = Table.Group(#"Add OverUnder", {"CaseNo.1", "Sec OverUnder"}, {{"Count", each _, type table [CaseNo=nullable text, AC=text, CaseNo.1=text, HighestCaseType=text, FCCCreatedDate=datetime, Activity=text, Activity Order=number, CaseNoActOrderID=text, Sec SEI Value=nullable number, Sec Avg Activity SEI=nullable number, Sec Total Avg SEI=nullable number, Sec Avg Running Total=nullable number, Sec OverUnder=any]}}),

//  Add index value to OverUnder with Case
    #"Added Custom1" = Table.AddColumn(#"Grouped Rows1", "Custom", each Table.AddIndexColumn([Count], "Index1", 1)),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom1", "Custom", {"CaseNo", "CaseNoActOrderID", "Index1"}, {"Custom.CaseNo", "Custom.CaseNoActOrderID", "Custom.Index1"}),

//  Remove unrequired columns
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Custom",{"Sec OverUnder", "Count", "Custom.CaseNo"})
in
    #"Removed Columns"

4c - Sec Data Table

let
    Source = #"1 - Data Table",
    #"Buffered Table" = Table.Buffer(Source),

//  Running Total
    #"Grouped Rows" = Table.Group(#"Buffered Table", {"CaseNo"}, {{"All", each _, type table [Column1=nullable text, Sec Avg Activity SEI=nullable number, Date=nullable date]}}),
    #"Invoked Custom Function" = Table.AddColumn(#"Grouped Rows", "fxSecRunningTotal", each fxSecRunningTotal([All], "CaseNo", "Sec Avg Activity SEI")),
    #"Expanded fxSecRunningTotal1" = Table.ExpandTableColumn(#"Invoked Custom Function", "fxSecRunningTotal", {"AC", "CaseNo", "HighestCaseType", "FCCCreatedDate", "Activity", "Activity Order", "CaseNoActOrderID", "Sec SEI Value", "Sec Avg Activity SEI", "Sec Total Avg SEI", "Sec Avg Running Total"}, {"AC", "CaseNo.1", "HighestCaseType", "FCCCreatedDate", "Activity", "Activity Order", "CaseNoActOrderID", "Sec SEI Value", "Sec Avg Activity SEI", "Sec Total Avg SEI", "Sec Avg Running Total"}),
    #"Remove All Column" = Table.RemoveColumns(#"Expanded fxSecRunningTotal1",{"All"}),

//  Calculate over/under SEI
    #"Added Over/Under" = Table.AddColumn(#"Remove All Column", "Sec OverUnder", each if [Sec Avg Running Total] > [Sec SEI Value] then "Over" else if [Sec Avg Running Total] < [Sec SEI Value] then "Under" else "Equal"),
    #"Changed Type" = Table.TransformColumnTypes(#"Added Over/Under",{{"Sec Total Avg SEI", type number}, {"Sec Avg Running Total", type number}}),
    
//  Calculate remaining balance
    #"Calculate Remaining Balance" = Table.AddColumn(#"Changed Type", "Sec SEI Balance", each [Sec SEI Value] - [Sec Avg Running Total], type number),
    
//  Calculate Final Activity and display in new column
    #"Max Activity Find" = Table.NestedJoin(#"Calculate Remaining Balance", {"CaseNo"}, #"2 - Max Activity Table", {"CaseNo"}, "Max Activity Table", JoinKind.LeftOuter),
    #"Max Activity Display" = Table.ExpandTableColumn(#"Max Activity Find", "Max Activity Table", {"MaxActivity"}, {"MaxActivity"}),

//  Calculate updated Running Total
    #"Grouped Rows2" = Table.Group(#"Max Activity Display", {"CaseNo"}, {{"All", each _, type table [Column1=nullable text, Sec Avg Activity SEI=nullable number, Date=nullable date]}}),
    #"Invoked Custom Function2" = Table.AddColumn(#"Grouped Rows2", "fxSecRunningTotal", each fxSecRunningTotal([All], "CaseNo", "Sec Avg Activity SEI")),
    #"Expanded fxSecRunningTotal2" = Table.ExpandTableColumn(#"Invoked Custom Function2", "fxSecRunningTotal", {"AC", "CaseNo", "HighestCaseType", "FCCCreatedDate", "Activity", "Activity Order", "CaseNoActOrderID", "Sec SEI Value", "Sec Avg Activity SEI", "Sec Total Avg SEI", "Sec Avg Running Total2"}, {"AC", "CaseNo.1", "HighestCaseType", "FCCCreatedDate", "Activity", "Activity Order", "CaseNoActOrderID", "Sec SEI Value", "Sec Avg Activity SEI", "Sec Total Avg SEI", "Sec Avg Running Total2"}),

//  Remove 'All' column as not required
    #"Remove All Column2" = Table.RemoveColumns(#"Expanded fxSecRunningTotal2",{"All"}),

//  Calculates the additional value to force final number to balance back to total SEI
    #"Calculate additional value for max activity" = Table.AddColumn(#"Remove All Column2", "Sec Over SEI Value", each if [Sec OverUnder] = "Over" then ([Sec Avg Running Total2] + [Sec SEI Balance]) - [Sec Avg Activity SEI] else 0),
    
//  Indexes activities within a case and whether they are over or under the SEI for the case. This is to establish additional apportionment values
    #"Added Index to Case and Over/Under" = Table.NestedJoin(#"Calculate additional value for max activity", {"CaseNoActOrderID"}, #"3c - SecOverUnder Index", {"Custom.CaseNoActOrderID"}, "3c - SecOverUnder Index", JoinKind.LeftOuter),
    #"Expanded 3c - SecOverUnder Index" = Table.ExpandTableColumn(#"Added Index to Case and Over/Under", "3c - SecOverUnder Index", {"Custom.Index1"}, {"Sec OverUnder Index"}),
    
//  SEI value if running total is greater than the total SEI for that case
    #"Handling of SEI when running total is greater than total value" = Table.AddColumn(#"Expanded 3c - SecOverUnder Index", "Custom", each if [Sec OverUnder] = "Over" and [Sec OverUnder Index] = 1 then [Sec Avg Activity SEI] + [Sec SEI Balance] else 0),
    #"Renamed Columns1" = Table.RenameColumns(#"Handling of SEI when running total is greater than total value",{{"Custom", "Sec Over SEI New Value"}}),
    
//  SEI value if running total is under and it's the final activity
    #"Handling of final activity if running total is under total value" = Table.AddColumn(#"Renamed Columns1", "Custom", each if [Sec OverUnder] = "Under" and [Activity Order] = [MaxActivity] then [Sec Avg Activity SEI] + [Sec SEI Balance] else 0),
    #"Renamed Columns2" = Table.RenameColumns(#"Handling of final activity if running total is under total value",{{"Custom", "Sec Under SEI New Value"}}),
    
//  Final Sec SEI Value
    #"Add Sec Final SEI" = Table.AddColumn(#"Renamed Columns2", "Sec Final SEI Value", each if [Sec OverUnder] = "Under" and [Activity Order] <> [MaxActivity] then [Sec Avg Activity SEI] else if [Sec OverUnder] = "Under" and [Activity Order] = [MaxActivity] then [Sec Under SEI New Value] else if [Sec OverUnder] = "Over" and [Sec OverUnder Index] = 1 then [Sec Over SEI New Value] else if [Sec OverUnder] = "Over" and [Sec OverUnder Index] <> 1 then [Sec Over SEI New Value] else 0)
in
    #"Add Sec Final SEI"

 

 

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!   This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions in the Forums to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber of SolutionsSuper UsersNumber of Solutions @anandm08  23 @WarrenBelz  31 @DBO_DV  10 @Amik  19 AmínAA 6 @mmbr1606  12 @rzuber  4 @happyume  7 @Giraldoj  3@ANB 6 (tie)   @SpongYe  6 (tie)     Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersSolutionsSuper UsersSolutions @anandm08  10@WarrenBelz 25 @DBO_DV  6@mmbr1606 14 @AmínAA 4 @Amik  12 @royg  3 @ANB  10 @AllanDeCastro  2 @SunilPashikanti  5 @Michaelfp  2 @FLMike  5 @eduardo_izzo  2   Meekou 2   @rzuber  2   @Velegandla  2     @PowerPlatform-P  2   @Micaiah  2     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 3:Community MembersSolutionsSuper UsersSolutionsPower Apps anandm0861WarrenBelz86DBO_DV25Amik66Michaelfp13mmbr160647Giraldoj13FLMike31AmínAA13SpongYe27     Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 4:Community MembersSolutionsSuper UsersSolutionsPower Apps DBO-DV21WarranBelz26Giraldoj7mmbr160618Muzammmil_0695067Amik14samfawzi_acml6FLMike12tzuber6ANB8   SunilPashikanti8

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (923)