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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
kennoe
Helper I
Helper I

Showing percentage calculation using multiple columns

I have to calculate a percentage amount based on data from three different tables. I have used this formula:

"divide(sum('Actual Expense'[Expense Amount])+sum('Forecast Expense'[Forecast Amount]),sum('Initiative Funding'[Amount]))"

and converted the outcome to a percentage.

 

The problem is this gives me an amount like 105% or 97%, instead of 5% or -3% that I want to show.

 

In excel, I would simply subtract 1 from the result of the formula, so I tried:

"divide(sum('Actual Expense'[Expense Amount])+sum('Forecast Expense'[Forecast Amount]),sum('Initiative Funding'[Amount])-value(1))" and while it worked for the lines I wanted, it also subtracted 1 from all the other data. See example below:

 

Initiative IdentifierPercent CompleteAmountExpense AmountForecast AmountVariance
C000510199%$151,644$156,171$3,0045%
C0005101    -100%
C0005101    -100%
C0005101    -100%
C0005101    -100%
C0005101    -100%
C0005101    -100%

 

This pattern is repeated for the other six projects in the data.

 

What is wrong with my formula?

 

Steve

1 ACCEPTED SOLUTION

hi, @kennoe

    After my test, it should be the reason that there are a lot of fields from different tables in one visual,

there is a simple way to solve it.

add a measure 

filter blank = DIVIDE(SUM(AE_Example41[Expense Amount])+SUM(FE_Example41[Forecast Amount]),SUM(IF_Example41[Amount]))

and drag it into visual level filter of the table filter and set the filter like this:

2.PNG

Result:

3.PNG

here is pbix, please try it.

https://www.dropbox.com/s/poq6lz5j8ez26uy/Showing%20percentage%20calculation%20using%20multiple%20co...

 

Best Regards,

Lin

 

 

Community Support Team _ Lin
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

6 REPLIES 6
v-lili6-msft
Community Support
Community Support

hi,@kennoe

       I have tested on my side, but not reproduce the issue. It seems that there are complex relationships between them

and what is  "Percent Complete" a column? a mesure?  we need more detail steps for us.

Please share your sample pbix for us. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.

 

 

Best Regards,

Lin

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

I have tested the data a number of times and get the same result each time. The data has been uploaded to DropBox and can be found here:

 

https://www.dropbox.com/preview/Public/Example41.pbix?role=personal

 

Steve

hi, @kennoe

    Your link seems to be invalid, please upload again.

14.PNG

Best Regards,

Lin

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

hi, @kennoe

    After my test, it should be the reason that there are a lot of fields from different tables in one visual,

there is a simple way to solve it.

add a measure 

filter blank = DIVIDE(SUM(AE_Example41[Expense Amount])+SUM(FE_Example41[Forecast Amount]),SUM(IF_Example41[Amount]))

and drag it into visual level filter of the table filter and set the filter like this:

2.PNG

Result:

3.PNG

here is pbix, please try it.

https://www.dropbox.com/s/poq6lz5j8ez26uy/Showing%20percentage%20calculation%20using%20multiple%20co...

 

Best Regards,

Lin

 

 

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

Thank you for this solution. For a novice like me, can you please explain how this resolves the problem?

 

Steve

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.