cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vickyno
Frequent Visitor

Calculate the percentage of the sum of column depending a text value of other column

Hi all!

 

I hace tw columns:

 

Column 1 = USD Value

Column 2 = Text with two values

 

I need a measure that calculates the percentage of each USD Value of Column 1 but selecting only the rows that in Column 2 has certain text value. 

 

Actually I am using: 

 

Measure  =
//Calcula el % del FMV 
DIVIDE([Column1],
CALCULATE(Column1, ALL(General)), 0 )
 
I guess I would have to change the ALL Formula for a new one that includes Column2? How do I dot that and specify that I want only the calculation of Column1 only when Column1 has certain value?
 
Thank you!
2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @vickyno 

Not clear the result you want. You may take steps bellow for reference.

Create the measure:

Measure 2 = DIVIDE(SELECTEDVALUE('Table'[Column1]),CALCULATE(SUM('Table'[Column1]),FILTER(ALL('Table'),'Table'[Column2]=SELECTEDVALUE('Table'[Column2]))),0)

result:

v-xiaotang_0-1620711597979.png

Hope it helps.

 

Best Regards,

Community Support Team _ Tang

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

AlB
Super User III
Super User III

Hi @vickyno 

Do you want to show some sample data plus the expected result?

Your explanation is not clear

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors