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

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

Reply
Anonymous
Not applicable

Help needed - count a value row wise

sd1.PNG

 

I would like to add the number of N row wise.

How do I do that?

 

Thanks,

Anand

1 ACCEPTED SOLUTION

@Anonymous ,

I added a column to your original table. No unpivoting.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

 

 

 

 

Summary = If(Original[a] = "Y", 1)+If(Original[b] = "Y", 1)+If(Original[c] = "Y", 1)

//just copy and paste the the first IF, and then change the letter on the rest.

YES3.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

9 REPLIES 9
Nathaniel_C
Community Champion
Community Champion

@Anonymous ,

 

 

My table

YES1.PNG

 

 

Go to Power Query and Select the two rows with the names. UnPivot => Other Rows.

YES2.PNG

 

Delete the attribute column, return to Power BI and create the measure below where Y_Table is my table, and the Columns are Y_Table[fname],Y_Table[sname]),Y_Table[Value]

 

 

Count of Y = CALCULATE(COUNTROWS(Y_Table),FILTER(ALLEXCEPT(Y_Table,Y_Table[fname],Y_Table[sname]),Y_Table[Value]="Y"))

YES.PNG


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Thanks for the solution. However I also want to display all the columns. I mean a,b,c,d,e and the count of N.

 

Kindly help me with that

@Anonymous ,

I added a column to your original table. No unpivoting.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

 

 

 

 

Summary = If(Original[a] = "Y", 1)+If(Original[b] = "Y", 1)+If(Original[c] = "Y", 1)

//just copy and paste the the first IF, and then change the letter on the rest.

YES3.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

This works great. However the only problem is that - if every column has N instead of Y, it isn't even displaying that row.

 

 

THanks,

Anand!

Summary = If(Original[a] = "Y", 1)+If(Original[b] = "Y", 1)+If(Original[c] = "Y", 1,0)

Add a ,0 after the 1 at the end





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Yes I did that

And does that work?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

fg1`.PNG

 

I haven't tried the one that you posted. But this worked -

 
 
 
 

Hi @Anonymous ,

 

Yes
Here is the pbix.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Kudoed Authors