Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
Red217
Helper III
Helper III

How to calculate Percentage from Remaining value in a measure?

Hi, 

 

i have this scenario, in which i have 3 "solutions" (s1,s2,s3) , each solutions has a "impact" % from the original value

Value = 100

 

 

i want to calculate the Percentage of s1 from value ,then the remaining perctenage of s2, and .... s3 from Value, 

for example:

STEP 1 - 50% (s1) from 100 = 50

STEP 2- then 50%(s2) from WHAT IS REMAINING from STEP1 = 50% from 50 = 25

STEP 3 then 50%(s3) from WHAT IS REMAINING from STEP2 = 50% from 25 = 12.5

 

 

solutionsimpactvalueexplain
s150%5050% from the original 100 value
s250%2550% from the "last row" value which is 50, so 50% from 50, 25
s350%12.5and now 50% from 25

 

how do i build a DAX measure for this please ? / way to make this work 

 

 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Red217 ,

 

Here's my solution.

1.I created a what-if parameter to get the original value 100.(You can get the different original values for slicer modifications.)

vstephenmsft_0-1663145445819.png

2.Create an index column to get the row count.

vstephenmsft_1-1663145780110.png

 

 

3.Create a measure to get the results.

Results = DIVIDE([Parameter Value],POWER(2,MAX('Table'[Index])))

vstephenmsft_2-1663145850043.png

 

 

 

Best Regards,

Stephen Tao

 

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

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

Hi @Red217 ,

 

Here's my solution.

1.I created a what-if parameter to get the original value 100.(You can get the different original values for slicer modifications.)

vstephenmsft_0-1663145445819.png

2.Create an index column to get the row count.

vstephenmsft_1-1663145780110.png

 

 

3.Create a measure to get the results.

Results = DIVIDE([Parameter Value],POWER(2,MAX('Table'[Index])))

vstephenmsft_2-1663145850043.png

 

 

 

Best Regards,

Stephen Tao

 

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

 

Hello   v-stephen-msft

 

i started to deep dive into it, my 50% is not fixed, its a "measure" , sometimes its 50% and sometimes and its 30% for example

how can use the same logic of i want to calculate the Percentage of s1 from value ,then the remaining perctenage of s2, and .... s3 from Value, 

 

the % will be ever changing , they are not fixed , they will arrive from another measure

 

to ilustrate : 

value

100

 

 

Explain

 

s1

75%

75

75% from 100

 

s2

30%

22.5

30% from 75

 

s3

40%

9

40% from 22.5

thank you SO MUCH !!! - EXACTLY what i needed

i was missing the POWER DAX usage.

 

THANK YOU

Red217
Helper III
Helper III

@amitchandak - you helped me a lot before, would love your input.

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

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.