Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
EdMbu
Frequent Visitor

Count number of "Left" in this measure

Lost Customers = IF([Total_amount_exclude_vat_]>0&&'All measure'[Last Period Revenue]<=0, "Left", BLANK())

Can someone explain to me how I can count the row number of this measure and filter the number of "Left". this measure is in a measure table. Thanks 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

To count the rows of a table you need to have a table first. 

 

Create a table variable to SUMMARIZE over the customer IDs. Use ADDCOLUMNS to compute if they left or not. FILTER the result by the ones that left.  Do a COUNTROWS over that result. That's what your measure should return.

View solution in original post

2 REPLIES 2
EdMbu
Frequent Visitor

Thanks. its work

lbendlin
Super User
Super User

To count the rows of a table you need to have a table first. 

 

Create a table variable to SUMMARIZE over the customer IDs. Use ADDCOLUMNS to compute if they left or not. FILTER the result by the ones that left.  Do a COUNTROWS over that result. That's what your measure should return.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.