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
Anonymous
Not applicable

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 @Anonymous 

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
Super User

Hi @Anonymous 

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
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.