Hi - i am hoping someone can help.
I am attempting to add a custom column in power query for powerbi desktop. The code i have is below, but i am getting a total count (14271), not a count of the filtered rows as shown in the table below the code - any idea how what i am doing incorrectly?
= Table.AddColumn( #"Expanded List_for_Est_Dates", "EST_ROW_COUNT", (row) => let SourceTable = #"Expanded List_for_Est_Dates", FilteredTable = Table.SelectRows( SourceTable, each [Dates] = row[Dates] and [ProjectID] = row[ProjectID] and [DAPolyID] = row[DAPolyID] and [ProductionUnitID] = row[ProductionUnitID] ), RowCount = Table.RowCount(FilteredTable) in RowCount, type number )
Expected results
Date | ProjectID | DAPOLYID | PRODUCTIONUNITID | ROW COUNT |
1/1/2022 | 10 | 15 | 20 | 2 |
1/1/2022 | 10 | 15 | 20 | 2 |
1/1/2022 | 12 | 20 | 20 | 2 |
1/1/2022 | 12 | 20 | 20 | 2 |
1/5/2022 | 10 | 15 | 20 | 3 |
1/5/2022 | 10 | 15 | 20 | 3 |
1/5/2022 | 10 | 15 | 20 | 3 |
mmbr1606
9
Super User 2025 Season 1
stampcoin
7
SD-13050734-0
6