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
apagan
Helper I
Helper I

Add value of two columns together

I've been attempting to add the value of 2 columns together into one column called Percentage, but have had no success.  Here's the formula I am using:

 

Percentage = CALCULATE(SUM(Appearances[Winner]) / Appearances[Loser]+Appearance[Winners)

 

What am I doing wrong?

 

Thanks!

1 ACCEPTED SOLUTION
LaurentCouartou
Solution Supplier
Solution Supplier

I bet you got an incredibly long error message with a long list of possible reasons why your measure would not work.

This message means you can only reference a column (like Appearances[Loser]😞

- when a row context exists (in the second argument of a FILTER, SUMX, ...., function)

- in an aggregate function like SUM, MIN, MAX, ...

- inside functions like VALUES, ALL, DISTINCT, FILTERS ...

 

In your case, you probably meant, :

 

CALCULATE( SUM(Appearances[Winner]) 
/ (
SUM(Appearances[Loser])
+SUM(Appearance[Winners)
)
)

 

View solution in original post

2 REPLIES 2
JoanCampbell
Frequent Visitor

I have one column where I added together Up and Built. Now I need to get the percentage up. But it is giving me an error. What am I doing wrong? 

JoanCampbell_0-1631949470136.pngJoanCampbell_1-1631949500188.png

 

LaurentCouartou
Solution Supplier
Solution Supplier

I bet you got an incredibly long error message with a long list of possible reasons why your measure would not work.

This message means you can only reference a column (like Appearances[Loser]😞

- when a row context exists (in the second argument of a FILTER, SUMX, ...., function)

- in an aggregate function like SUM, MIN, MAX, ...

- inside functions like VALUES, ALL, DISTINCT, FILTERS ...

 

In your case, you probably meant, :

 

CALCULATE( SUM(Appearances[Winner]) 
/ (
SUM(Appearances[Loser])
+SUM(Appearance[Winners)
)
)

 

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.