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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
dgyurdieva
Frequent Visitor

Calculate and visualize percentage of the category (not the total)

So I have this data below. I want to make a bar chart with "category" on the x axis, number of users on the y axis and each game to have differently colored bar chart. But I also want to be shown as a percentage not of the total users but of the total users of that particular game. So basically the sum of bars colored the same has to be 100%. In this way you can say that for game a the users are mainly in 1-10 category for example. The games can be filtered (diplaying only game a or a and b, etc.)
How can I calculate that percentage? 

I couldnt find any answer anywhere 😞 Thanks


game userid category
a 1 1-10
b 2 1-10
c 3 10-20
d 4 10-20
a 5 10-20
a 6 20-30
a 7 20-30
b 8 20-30
b 9 20-30
b 10 20-30
c 11 20-30
c 12 20-30
 

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @dgyurdieva,

 

you need to choose the 100% stacked column chart (6 visualization) and then add:

 

Category - Axis

UserId - Value (count)

Game - Legend

 

and you should have what you need

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

6 REPLIES 6
MFelix
Super User
Super User

Hi @dgyurdieva,

 

you need to choose the 100% stacked column chart (6 visualization) and then add:

 

Category - Axis

UserId - Value (count)

Game - Legend

 

and you should have what you need

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi, thank you for the answer but I think you did not quite get my question. I want it to look like this but the sum of all, for example red bars to be 100%, then all green 100% as well 

s.PNG

Did you ever find a solution to this? I'm having the same issue, and it's driving me mad.

You can make a measure that calculate the percentage based on game.and.then.add it to a bar chart.

Regards,
MFelix

Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Any thoughts on how it should look?

Hi @dgyurdieva,

 

Current power bi not contains the visual support show clustered column and percent at same time, perhaps you can submit a idea for this requirement.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.