Forum Discussion
Normalize values based on the first one
- 9 years ago
Hi zivhimmel
I would do something like this:
(I'm calling your fact table Data and assuming you have a related calendar table called Calendar with the relationship on the Date column, and a base measure called [Value] )
- Define a measure [Value First Date]
Value First Date = /* Optional check: Only return Value First Date up to the max date that actually appears in the fact table */ IF ( MIN ( 'Calendar'[Date] ) <= CALCULATE ( MAX ( Data[Date] ), ALL ( Data ) ), CALCULATE ( [Value], CALCULATETABLE ( FIRSTDATE ( 'Calendar'[Date] ), ALLSELECTED ( 'Calendar' ) ) ) ) - Define a [Value Normalized] measure:
Value Normalized = DIVIDE ( [Value], [Value First Date] ) * 100
- Define a measure [Value First Date]
Hi zivhimmel
I would do something like this:
(I'm calling your fact table Data and assuming you have a related calendar table called Calendar with the relationship on the Date column, and a base measure called [Value] )
- Define a measure [Value First Date]
Value First Date = /* Optional check: Only return Value First Date up to the max date that actually appears in the fact table */ IF ( MIN ( 'Calendar'[Date] ) <= CALCULATE ( MAX ( Data[Date] ), ALL ( Data ) ), CALCULATE ( [Value], CALCULATETABLE ( FIRSTDATE ( 'Calendar'[Date] ), ALLSELECTED ( 'Calendar' ) ) ) ) - Define a [Value Normalized] measure:
Value Normalized = DIVIDE ( [Value], [Value First Date] ) * 100
- autodafe9 years agoResolver I
Very Nice Example!
I would need as similar method that calculatyes 100 as ANY first date taken in to account as starting date, and then normalize values accordingly. Is it possible with DAX ? - autodafe9 years agoResolver I
Excellent!
I would nee to set the value to 100 to ANY first date taken into account for analysis and then normalize subsequent values accordingly.
Is this possible in DAX?