cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

## Percentage based on Total of Column Series Values

I am trying to work out what measure I need to show the percentage of each column series value grouped by month.

The X axis is the date and I am using column series to split the case origin.

I plan to put the measure in a tooltip which would show:

• October 1.8/2.6K (69.2%) for light blue and 0.8K/2.6K (30.8%) for dark blue.
• Novembe 2.0/2.9K (69.0%)  for light blue and 0.9K/2.9K (31.0%) for dark blue.

I have a table called 'Case', the date column is 'Case'[CreatedDate] and split into series 'Case'[Origin]

1 ACCEPTED SOLUTION
Community Support

Hi @JaseC1 ,

You can try the following code:

``````% =
DIVIDE(
SUM( 'Table'[Values] ),
CALCULATE( SUM( 'Table'[Values] ), ALLSELECTED( 'Table'[Type] ) )
)
``````

Result:

Best Regards

Community Support Team _ chenwu zhu

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

2 REPLIES 2
Community Support

Hi @JaseC1 ,

You can try the following code:

``````% =
DIVIDE(
SUM( 'Table'[Values] ),
CALCULATE( SUM( 'Table'[Values] ), ALLSELECTED( 'Table'[Type] ) )
)
``````

Result:

Best Regards

Community Support Team _ chenwu zhu

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

Super User

Hi @JaseC1

When you drag the field/column across on to the visual pane, do you have the ability to click the little down arrow and select Show Value As? If so, you may be able to achieve what you're after without code/measure.

Otherwise you can create the below three measures:

Total Sales = SUM ( Table[Amount] )

Total by Cat = CALCULATE ( [Total Sales] , ALL ( Table[Category] )

As Percent = DIVIDE ( [Total Sales] , [Total by Cat] , 0 )

Hopefully the above makes sense and apologies for syntax errors - on phone.

All the best,

Theo

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

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

#### Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors