Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, everyone!
I have the following table:
| Gerencias | Score |
| UN-BC | 3,34 |
| SE | 3,65 |
| PGPO | 2,96 |
| GOPE | 3,16 |
| GDRS | 3,24 |
| ENGP | 3,25 |
| ATP-MRL | 3,70 |
| ATP-MLS | 2,77 |
| ATP-BR-TVD | 3,24 |
I'm trying to calculate something using a different logic depending on 2 conditions, and these conditions is depending on the value of the row (the column "Gerencias" will dictate that). If the rows value is equal "UN-BC" I need to divide his "Score" by the average of the others rows. And for each other row (whatever the value is, it just needs to be different of "UN-BC"), I will divide the UN-BC "Score" by the own rows "Score".
Is that a way to do that? I already tried and can't figure out the best way to do that.
Thanks for your attention.
Solved! Go to Solution.
@mco_jr ,
try this measure,
Average Of Score =
VAR _averageWithoutUNBC =
CALCULATE (
AVERAGE ( 'Table'[Score] ),
ALL ( 'Table' ),
'Table'[Gerencias] <> "UN-BC"
)
VAR _UNBCScoreDivison =
DIVIDE (
CALCULATE ( SUM ( 'Table'[Score] ), 'Table'[Gerencias] = "UN-BC" ),
_averageWithoutUNBC
)
VAR _UNBC =
DIVIDE (
CALCULATE ( MAX ( 'Table'[Score] ), 'Table'[Gerencias] = "UN-BC" ),
MAX ( 'Table'[Score] )
)
VAR _result =
IF ( SELECTEDVALUE ( 'Table'[Gerencias] ) = "UN-BC", _UNBCScoreDivison, _UNBC )
RETURN
_result
@mco_jr ,
When you average of the other rows, Is that mean average = (a+b+c)/n? and for the the other rows, do you need divide UN-BC "Score" by other own scores at row level for other Gerencias which is not equal to UN-BC?
Hi, mate!
Yeah, it's exactly that, and I need to show everything on a table. I need to calculate everything for each row individually.
@mco_jr ,
try this measure,
Average Of Score =
VAR _averageWithoutUNBC =
CALCULATE (
AVERAGE ( 'Table'[Score] ),
ALL ( 'Table' ),
'Table'[Gerencias] <> "UN-BC"
)
VAR _UNBCScoreDivison =
DIVIDE (
CALCULATE ( SUM ( 'Table'[Score] ), 'Table'[Gerencias] = "UN-BC" ),
_averageWithoutUNBC
)
VAR _UNBC =
DIVIDE (
CALCULATE ( MAX ( 'Table'[Score] ), 'Table'[Gerencias] = "UN-BC" ),
MAX ( 'Table'[Score] )
)
VAR _result =
IF ( SELECTEDVALUE ( 'Table'[Gerencias] ) = "UN-BC", _UNBCScoreDivison, _UNBC )
RETURN
_result
Ohh, I see now, the rows are getting empty, because this table is a summarized one, do you know if there is other solution or adjustment for this case?
Thanks for your answer, mate!
But the problem still the same, I can't see the result using a table visualization, all the rows disappear when I add the measure to the visualization.
Before:
After:
I can't figure out a way to show up all the results, row by row...
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.