Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Min-max normalization with averages values

Hello to the team,   I have been trying to do some min max normalization on average value, I am sorry because I have found some resources here but I can't seem to make it work. It's my first time u...
  • v-luwang-msft's avatar
    5 years ago

    Hi Anonymous ,

    Use the following measures:

    averagE1 =
    VAR averagE1 =
        CALCULATE (
            ROUND ( AVERAGE ( Table1[Value] ), 1 ),
            FILTER (
                ALLSELECTED ( Table1 ),
                Table1[Attribute] = MAX ( 'Table1'[Attribute] )
                    && Table1[Name] = MAX ( Table1[Name] )
                    && Table1[vlauetype] = MAX ( Table1[vlauetype] )
            )
        )
    RETURN
        averagE1
    maxvalue2 =
    CALCULATE (
        MAXX ( Table1, [averagE1] ),
        FILTER (
            ALLSELECTED ( Table1 ),
            Table1[Attribute] = MAX ( 'Table1'[Attribute] )
                && Table1[vlauetype] = MAX ( Table1[vlauetype] )
        )
    )
    
    minvalue2 =
    CALCULATE (
        MINX ( Table1, [averagE1] ),
        FILTER (
            ALLSELECTED ( Table1 ),
            Table1[Attribute] = MAX ( 'Table1'[Attribute] )
                && Table1[vlauetype] = MAX ( Table1[vlauetype] )
        )
    )
    Out2 =
    ROUND ( ( [averagE1] - [minvalue2] ) / ( [maxvalue2] - [minvalue2] ), 2 )

    Final you will get what you want!

    Wish it could help you!

     

     

    Best Regards

    Lucien