Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
kmo
Regular Visitor

Normalize row based on another row's value

Hi,

 

I have a time series table like this one, and what I want to do is calculate a normalized Rating based on the relevant Rating for each Team and Rating_Type in year 1. To be clear, I mean I want to divide Rating by the year 1 value of Rating for each Year, Team, and Rating_type.

 

TeamYearRating_TypeRating
A1Happiness5
A1Quality4.5
A2Happiness5
A2Quality5
B1Happiness4.5
B1Quality5
B2Happiness4.5
B2Quality5
C1Happiness4
C1Quality5
C2Happiness3
C2Quality5

 

I've tried this a few different ways but none seem to work. I'm new to Power BI and I think I am still thinking of this in terms of how I'd do the calculation in excel, SQL, etc. Help me think in a Power BI way, please. Thanks.

1 ACCEPTED SOLUTION

HI @kmo

 

Try this column

 

Column =
Table1[Rating]
    / CALCULATE (
        SUM ( Table1[Rating] ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[Team], Table1[Rating_Type] ),
            Table1[Year] = 1
        )
    )

View solution in original post

6 REPLIES 6
afzalphatan
Resolver I
Resolver I

You can use the below formula for your requirement 

=
Var Denominator = CALCULATE(SUM(Table2[Rating]), CALCULATETABLE(Table2, ALLEXCEPT(Table2, Table2[Team], Table2[Rating_Type]), Table2[Year] = 1))
Return
DIVIDE(Table2[Rating], Denominator)
SivaMani
Resident Rockstar
Resident Rockstar

Can you share your expected result for better understanding?

Hi, here is the expected result. Does this help? Thanks!

Team

YearRating_TypeRatingRating_Normalized_by_Year_1
A1Happiness5=5/5=100%
A1Quality4.5=4.5/4.5=100%
A2Happiness5=5/5=100%
A2Quality5=5/4.5=111%
B1Happiness4.5=4.5/4.5=100%
B1Quality5=5/5=100%
B2Happiness4.5=4.5/4.5=100%
B2Quality5=5/5=100%
C1Happiness4=4/4=100%
C1Quality5=5/5=100%
C2Happiness3=3/4=75%
C2Quality5=5/5=100%

HI @kmo

 

Try this column

 

Column =
Table1[Rating]
    / CALCULATE (
        SUM ( Table1[Rating] ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[Team], Table1[Rating_Type] ),
            Table1[Year] = 1
        )
    )

Thank you. As a new user, I'm sure I am missing something.

I get the error "Expression.Error: The name 'CALCULATE' wasn't recognized. Make sure it's spelled correctly."

 

I was trying to put your formula into the Query Editor --> Custom column box. It seems that DAX formulas (I think that's what this is) don't work there. Is there somewhere else I should be putting this code?

 

HI @kmo

 

Yes you are right... this won't work in Query Editor.. since it is a calculated column (different than a custom column)

 

Exit the Query Editor>>>Go to modelling Tab>>>New Column>>then use this formula

 

 

Normalize.png

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.