Forum Discussion
ncreixent
8 years agoNew Member
Index 100 Measure with dynamic 100 base date
Hello Everyone! I'm trying to create a measure that expresses prices as base 100, where the base 100 date is the earliest filtered date on a page level. The dataset that I have contains...
- 8 years ago
HI ncreixent
Try using ALLSELECTED instead of ALL
i.,e. to say
Price_Index = VAR Date_index = CALCULATE ( MIN ( 'SSD'[DATE] ), ALLSELECTED ( SSD ) ) RETURN ( SUM ( SSD[Val] ) / SUM ( SSD[Vol] ) ) / ( CALCULATE ( SUM ( SSD[Val] ), SSD[DATE] = Date_index ) / CALCULATE ( SUM ( SSD[Vol] ), SSD[DATE] = Date_index ) ) * 100
Zubair_Muhammad
Community Champion
8 years agoHI ncreixent
Try using ALLSELECTED instead of ALL
i.,e. to say
Price_Index =
VAR Date_index =
CALCULATE ( MIN ( 'SSD'[DATE] ), ALLSELECTED ( SSD ) )
RETURN
( SUM ( SSD[Val] ) / SUM ( SSD[Vol] ) )
/ (
CALCULATE ( SUM ( SSD[Val] ), SSD[DATE] = Date_index )
/ CALCULATE ( SUM ( SSD[Vol] ), SSD[DATE] = Date_index )
)
* 100ncreixent
8 years agoNew Member
Worked perfectly. Thank you Zubair_Muhammad!