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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Percentage value of a row

I would like to get a % value of rows.

It can be in tooltip or in main visual.

 

Screenshot 2022-03-17 122524.png

 

For example in 1st row I need 1 - 20% and 4 - 80%

 

Currently PBI is calculating % values to the totals, so 1st row is like 1- 2,44% and 4 - 9,76%

 

How can I get this?

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

I have created a data sample:

Eyelyn9_0-1647850804843.png

If so want to show % of each [Name], you could simply use 100% Stacked Column chart.

Eyelyn9_1-1647850901012.png

 

Or as you mentioned, still use Stacked Bar chart , createa a measure for Tooltips , for example:

Measure = 
var _group=CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Name]))
var _subGroup=CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Name],'Table'[Type]))
return DIVIDE(_subGroup,_group)

Eyelyn9_3-1647851046654.png

 

 

Best Regards,
Eyelyn Qin
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
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

I have created a data sample:

Eyelyn9_0-1647850804843.png

If so want to show % of each [Name], you could simply use 100% Stacked Column chart.

Eyelyn9_1-1647850901012.png

 

Or as you mentioned, still use Stacked Bar chart , createa a measure for Tooltips , for example:

Measure = 
var _group=CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Name]))
var _subGroup=CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Name],'Table'[Type]))
return DIVIDE(_subGroup,_group)

Eyelyn9_3-1647851046654.png

 

 

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

Anonymous
Not applicable

Thank you @v-eqin-msft 

PaulDBrown
Community Champion
Community Champion

Assuming the Axis is from Table [field] and the measure displayed is [measure], try:

% per field =
VAR _field =
    CALCULATE ( [measure], ALLEXCEPT ( Table, Table[field] ) )
RETURN
    DIVIDE ( [measure], _field )




Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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