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
katie15013
Regular Visitor

Table counting 0s as well as 1s

Hi,

 

I want to create a table visual that shows counts of particular health conditions. The data I am using currently codes this information as Y or N, so I have created custom columns for each condition and used an IF formula to change the Ys into 1s. This seems to have worked fine. But when I put these columns into my table it just seems to be counting all rows instead of only those with 1s in.Table Problem 3.PNG

 

Table problem.PNGTable Problem 2.PNG

 

How can I also get this to show one health condition per row (and the counts in the 2nd column) rather than each condition by column?

1 ACCEPTED SOLUTION
Daviejoe
Memorable Member
Memorable Member

Would it not be better to create Measures for each of the columns?

 

Autism Count =

Sum (Autism_Count)





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
Daviejoe
Memorable Member
Memorable Member

Would it not be better to create Measures for each of the columns?

 

Autism Count =

Sum (Autism_Count)





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

Proud to be a Super User!




Thanks! I couldn't figure out how to do as you said (I used that formula but it didn't seem to work for me. Can you tell I'm a beginner? 🙄) but I managed to figure out a way based on your suggestion:

Table problem 9.PNG

 

And have this now! So thanks !

Table problem 11.PNG

p.s. if you feel that my answer gave you the correct solution then please select the Accept as Solution button.

 

Thanks


David





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

Proud to be a Super User!




Hey Katie,

 

no worries, no one was born an expert so we all start from the same place.

 

Glad you could find a solution.

 

Regards

 

David





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

Proud to be a Super User!




ibarrau
Super User
Super User

Hi. Can you show in excel or paint your expected result? I'm not sure if you are looking for avoid summarization to show the rows clicking on the down arrow of the field in the visualization like this:

ibarrau_0-1601985270001.png

I also think you might be looking for showing the values by rows instead of columns changed in matrix format menu under values:

ibarrau_1-1601985449365.png

 

Hope this helps, if it doesn't please show your expected result 🙂

 

 


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

Happy to help!

LaDataWeb Blog

Sorry for replying over two messages.

 

I switched to rows using the matrix visual. It is still counting strangely though. There are definitely not 7 1's for each of those cateogories.

Table problem 7.PNG

No worries. That sounds like something you should check out in your data and your count calculation. It's not a problem of changing to rows :S

Power Bi is only reading the data. Try creating a filter with those 0 and 1 category counting cards or something like that to be sure that the problem might be in the data.

Regards,

 


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

Happy to help!

LaDataWeb Blog

Hi, thanks for your reply. When I click 'Don't Summarise' it now shows the results like this:

table problem 5.PNG

 

I would just like to show it like this:

 

Table problem 6.PNG

Ok. Like I said in the second part of the post, that result would be found only in a Matrix visualization. Forget about "Don't Summarize", that was for another purpose. Return to your original visualizaiton. Make the visualization a matrix. Go to format menú > values option > Show on Rows. Once you enable that option you will see the data like that.

Regards,


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

Happy to help!

LaDataWeb Blog

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.