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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Stuart95051
New Member

How to build a visual with these requirements?

Let's say I've data like this:

 

 SweetSour/TartUmamiSpicyBitterVegan
Sweet n Sour Pork111   
Mapo Tofu1 11  
Sushi  1   
Soy Burger  1  1
Lagsane111   
Apple Pie1     

 

I want to build a visual to show % of my menu which has the Sweet characteristics, % of my menu which has the Sour characteristics, % of my menu which has the Umami characteristics, and so on an so forth.  It's easy to do this in Excel, I'd first need to count the number of items in my menu.  How do I do the same in PowerBi so that it can be used to calculate the % later?  

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Stuart95051 ,

I create a table as you mentioned and I think you can let Bitter column become 0.

vyilongmsft_0-1730872993544.png

Then I think you can create six measures and here is a common template for these measures, you can change their respective names as needed.

SweetPercent =
DIVIDE (
    CALCULATE ( COUNTROWS ( 'Table' ), VALUE ( 'Table'[Sweet] ) = 1 ),
    COUNTROWS ( 'Table' )
)

vyilongmsft_1-1730873343041.pngvyilongmsft_2-1730873356210.png

Finally you can put them into pie visual and it will give you what you want.

vyilongmsft_3-1730873449128.png

 

 

Best Regards

Yilong Zhou

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

3 REPLIES 3
Anonymous
Not applicable

Hi @Stuart95051 ,

I create a table as you mentioned and I think you can let Bitter column become 0.

vyilongmsft_0-1730872993544.png

Then I think you can create six measures and here is a common template for these measures, you can change their respective names as needed.

SweetPercent =
DIVIDE (
    CALCULATE ( COUNTROWS ( 'Table' ), VALUE ( 'Table'[Sweet] ) = 1 ),
    COUNTROWS ( 'Table' )
)

vyilongmsft_1-1730873343041.pngvyilongmsft_2-1730873356210.png

Finally you can put them into pie visual and it will give you what you want.

vyilongmsft_3-1730873449128.png

 

 

Best Regards

Yilong Zhou

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

Rupak_bi
Super User
Super User

Hi @Stuart95051 

 

Just unpivot all columns except the first one from power query. 

Rupak_bi_0-1730800318943.png

 



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

Thanks for the idea!  My horizontal totals and vertical totals are all 100%.  I think it has something to do with my data type (integer).  Let me convert them to true/false and see what happens.  

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors
Top Kudoed Authors