cancel
Showing results for
Did you mean:

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Helper II

## Calculate percentage based on the area

Hello experts,

I'm looking for a measure that calculates a percentage based on the total of all the money spent divided by sum of money spent in each area.

 Area Sum of money spent Percentage based on total by area BO 10,935 3.090992227 FA 792 42.67676768 IA 18016 1.876110124 IT 4057 8.33127927 Total 33,800

Thank you

1 ACCEPTED SOLUTION
Super User

Would a measure like this help?

``````Pct =
DIVIDE(
SUM( 'Table'[Sum of money spent] ),
CALCULATE(
SUM('Table'[Sum of money spent] ),
ALL( 'Table' )
)
)
``````
4 REPLIES 4
Resident Rockstar

Hi @geeklarokcmie - First, create a measure to calculate the total amount spent.

Eg: TotalAmountSpent = SUM(SpendingData[some of amount spent])

create an one more measure to calculate the percentage of money spent in each area

PercentageSpentInArea =
DIVIDE(
SUM(SpendingData[Amount]),
[TotalAmountSpent],
0
)

use the above measure in your table chart and see the values will work as per expectations.

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Helper II

Im getting all the percentage values as 100.00% using your DAX measure

Super User

Would a measure like this help?

``````Pct =
DIVIDE(
SUM( 'Table'[Sum of money spent] ),
CALCULATE(
SUM('Table'[Sum of money spent] ),
ALL( 'Table' )
)
)
``````
Helper II

This worked perfectly. Thank you 🙂

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 - June 2024

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

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors