web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : ZzD6VNLE7FKQkf+T7D8pDU
Power Apps - Power Query
Answered

Add a row to count rows in power query

Like (0) ShareShare
ReportReport
Posted on 6 Oct 2023 20:56:07 by

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

DateProjectIDDAPOLYIDPRODUCTIONUNITIDROW COUNT
1/1/20221015202
1/1/20221015202
1/1/20221220202
1/1/20221220202
1/5/20221015203
1/5/20221015203
1/5/20221015203
     

 

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard

Featured topics