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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
JenWilson
Helper II
Helper II

Adding a column to count rows associated with specific criteria

I have a data table (1st table on the left) in my power BI report that I want to summarize based on the count of "Error Outcomes" from the table (so it would look similar to the one on the right). The yellow section has 4 rows where there were 4 errors; 3 that were fixed and 1 that was tossed. I would like to summarize this data based on the criteria that the "Order#" and "EE#" are the same. Therefore, there would be two rows for order 111; 1 row indicating that there were 3 "Fixed" items and one row where that was 1 "Tossed" item. 

Is there a way to do such as I am asking? 

 

JenWilson_0-1693499456451.png

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @JenWilson ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a measure.

count of error outcomes = COUNTROWS(FILTER(ALLSELECTED('Table'),'Table'[EE #]=MAX('Table'[EE #]) && 'Table'[order #]=MAX('Table'[order #]) && 'Table'[Error Outcom]=MAX('Table'[Error Outcom])))

(3)We can create a table.

Table 2 = SUMMARIZE('Table','Table'[Name],'Table'[Error Outcom],'Table'[Error Outcome as #],'Table'[EE #],'Table'[order #],"count of error outcomes",[count of error outcomes])

(4) Then the result is as follows.

vtangjiemsft_0-1693547871980.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

Thank you so much. This worked just as I requested! 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @JenWilson ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a measure.

count of error outcomes = COUNTROWS(FILTER(ALLSELECTED('Table'),'Table'[EE #]=MAX('Table'[EE #]) && 'Table'[order #]=MAX('Table'[order #]) && 'Table'[Error Outcom]=MAX('Table'[Error Outcom])))

(3)We can create a table.

Table 2 = SUMMARIZE('Table','Table'[Name],'Table'[Error Outcom],'Table'[Error Outcome as #],'Table'[EE #],'Table'[order #],"count of error outcomes",[count of error outcomes])

(4) Then the result is as follows.

vtangjiemsft_0-1693547871980.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Thank you so much. This worked just as I requested! 

amitchandak
Super User
Super User

@JenWilson , Have a measure sum of Error Outcomes. and use that in visual with other columns 

 

If you want a new table you can use group by in the power query

https://docs.microsoft.com/en-us/power-query/group-by

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.