deldersveld's avatar
deldersveld
Resident Rockstar
9 years ago

Normalize Numeric Data

Normalize numeric data from several independent ranges to a uniform scale ranging from 0 to 1. This can be used as a precursor for clustering, creating parallel coordinates plots, and more.

 

Follows formula:

(x-min(x))/(max(x)-min(x))

Using the DAX measure:

 

Normalized Value = 
VAR MinOfGroup = CALCULATE(MIN('Table'[Value]),ALLEXCEPT('Table','Table'[GroupAttribute]))
VAR MaxOfGroup = CALCULATE(MAX('Table'[Value]),ALLEXCEPT('Table','Table'[GroupAttribute]))
VAR DetailValue = MAX('Table'[Value])
RETURN DIVIDE(DetailValue - MinOfGroup,MaxOfGroup - MinOfGroup,0)

 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    How did you create the image of all the lines for the cars that were not selected in the background?

  • SKan's avatar
    SKan
    Frequent Visitor

    Hi, Thanks for the article.

    I have one question. Why did you use MAX(Table[Value]) for each data point? Wouldnt it return the max value for the whole "value" column, while w need the current cell value here.

    VAR DetailValue = MAX('Table'[Value])