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

Visualizing the amount of rows with a specific condition

Hey everyone, I have a question. I have a table with multiple columns (the Health column is a calculated column, which is calculated by other columns in this table, in case that is of importance) which looks something like this (in reality there are more rows and columns): 

ID DateHealth in %
TF 11.1.202099
TF 34.1.202068
TF 419.1.202091
TF 45.2.202076
TF 710.2.202092
TF 812.2.202078

 

I now want to count the number of rows, i.e. products, who's health lies in a specific range of percentage, so I would like to count the number of entries who's health lie in the range 100%-95%, then how many lie in 95%-90% and so on. Then I would like to visualize these results in form of a bar chart (my idea so far) where the x-axis are those percentage ranges and the y-axis is the amount of entries.

 

Now counting isn't the problem. So far I have been adding calculated columns where each column is one of those ranges and then I have filtered the rows which lie in them. From then on you can count the rows by using the COUNTROWS operator and I could work from there. But this seems like far too much work for such a 'simple' task. Is there a better way to do this that I am not aware of?

 

Any help would be appreciated. THANKS!! 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

you can try use SWITCH()

Column = SWITCH(TRUE(),Sheet41[Health in %]>95,"95-100",Sheet41[Health in %]>90,"90-95")

1.PNG





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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User
ryan_mayu
Super User
Super User

@Anonymous 

you can try use SWITCH()

Column = SWITCH(TRUE(),Sheet41[Health in %]>95,"95-100",Sheet41[Health in %]>90,"90-95")

1.PNG





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

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.