Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Query
Answered

Add a row to count rows in power query

(0) ShareShare
ReportReport
Posted on 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
     

 

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Query

#1
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 7

#3
SD-13050734-0 Profile Picture

SD-13050734-0 6

Overall leaderboard

Featured topics