Normalize Numeric Data

4455 Views
Highlighted
Advisor
Posts: 359
Registered: ‎06-26-2015

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)

 

Attachment
New Member
Posts: 1
Registered: ‎11-13-2018

Re: Normalize Numeric Data

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

Advisor
Posts: 359
Registered: ‎06-26-2015

Re: Normalize Numeric Data

There are two line charts overlaid one on the other. The background one has consistent color for all lines, and the visual interactions are set so that car slicer will only filter the top line chart and not the background one.

 

I wrote a bit about the technique deep into this blog post: https://dataveld.com/2017/05/06/throwing-a-curve-at-the-power-bi-line-chart/

"If you would like to add other visuals to the report, crossfiltering will be an issue since the line chart does not allow highlighting. In this case, an overlay can be beneficial. This technique works for any line chart by the way, not just this curved one. By disabling the visual interaction for the “underlay” and setting a static Y Axis range for the overlay but keeping the default interaction set to filter, you can get a highlighting effect."