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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors