cancel
Showing results 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.

Frequent Visitor

## Apply specific percentage to values

Hello,

I have a table with a specific value (=total investment) on which I'd like to apply specific percentages (=fixed): 45% of the total investment, and then 10% of the total investment to use then those calculated values for other calculation. WHat formula should I use to create those 45% / 10% calculation?

thanks

1 ACCEPTED SOLUTION
Community Champion

Maybe something like:

``````Full Category A =
CALCULATE (
SUM ( Table[TotalInvestment] ),
KEEPFILTERS ( Category[Column] = "A" )
)
+ 0.45
* CALCULATE (
SUM ( Table[TotalInvestment] ),
KEEPFILTERS ( Category[Column] = "D" )
)``````

How will you add that the last 2 rows of the visuals?

8 REPLIES 8
Super User

Frequent Visitor

Sorry went to quick on the message. I'd like to undertsand what formula to use to create the 45% / 10% calculation on a specific field. thanks

Community Champion
Something like
Measure = 0.45 * CALCULATE ( SUM ( total investment ), ALL ( ColumnNameThatYouWillSliceBy ) )
Frequent Visitor

Thanks, I was so able to apply specific percentage to the values.

Now I am a bit stuck at the next step of my calculations - posting a picture to make it more clear (ultimately looking to calculate last line = full category A). I need to apply the percentages of each \$ field per category ; and then do some sums. Can I include the filtering of category in the formulas?

Community Champion

Maybe something like:

``````Full Category A =
CALCULATE (
SUM ( Table[TotalInvestment] ),
KEEPFILTERS ( Category[Column] = "A" )
)
+ 0.45
* CALCULATE (
SUM ( Table[TotalInvestment] ),
KEEPFILTERS ( Category[Column] = "D" )
)``````

How will you add that the last 2 rows of the visuals?

Frequent Visitor

thanks, that works.

indeed I dont know how to build the rows - is it possible?

Community Champion

Try something like this:

``CustomTotalSales = SUMX( CustomBrands, CustomBrands[TotalSales] )``
Super User

If you only ever have categories A to D then you can create a measure for each (plus the two measures for the last two lines).

The moment you have a dynamic list of categories you're basically out of luck.

Announcements

#### 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

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors