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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Gladiator909
Helper I
Helper I

Understanding Percentages - Calculating future value

Hi guys,

 

I am stuck on what should be a pretty straight forward dax measure. I am hoping I can get some clarity on how the percentages work in Power BI. Here is my table:

 

Marble ColorPrevious AmountRecoveredProcessed
Blue2002050
Green30040120
Red15010100
Yellow1003060

 

I am calculating the recovery rate as follows: 

 

Recovery Rate = divide(sum('Table'[Recovered]),sum('Table'[Processed])) 
And it is a percentage
 
And now I need to calculate the "projected value": [Previous Amount] * Recovery Rate
 
This is the DAX for that: 
Projection = sum('Table'[Previous Amount]) * [Recovery Rate]
 
Here is the visual that this gives me:
 
Gladiator909_0-1689280507970.png

 

What I would like the "Total Projection" card to return instead is (80 + 100 + 15 + 50) = 245

 
Now I do understand that the way Power BI is calculating the recovery rate is basically summing all the recovered marbles and dividing by all the processed marbles and coming up with a % and using that % value to return me 227.27
 
Any ideas how to modify the DAX (Projection = sum('Table'[Previous Amount]) * [Recovery Rate]) 
so that it returns 245 instead?
 
I know I can create one dax for each marble color and add it all up but that would mean loosing the ability to use a slicer on the chart.
 
Any help would be greatly appreciated
 
Thanks



1 ACCEPTED SOLUTION
LuizKoller
Resolver I
Resolver I

Hey,

 

Try using SUMX:

 

Total Projection =
SUMX('Table', [Recovery Rate] * 'Table'[Previous Amount])



This evaluate line by line and sum each time.

View solution in original post

1 REPLY 1
LuizKoller
Resolver I
Resolver I

Hey,

 

Try using SUMX:

 

Total Projection =
SUMX('Table', [Recovery Rate] * 'Table'[Previous Amount])



This evaluate line by line and sum each time.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.