Forum Discussion
SELECTEDVALUE to CustomColumn
- 5 years ago
I was able to figure this out, thanks to other contributors.
basically SELECTEDCALUE cannot be used for creating a Custom Column or even a even creating a table. It can only be used in a Measure.
So I created measures for all my facts and replaced them in the historic graphs of my report and it worked like a charm.
Measure =
var _currdt = SELECTEDVALUE ( User selected date)
var _Prvdt = DATE(YEar (_currdt), MONTH (_currdt) -12, DAY(_currdt))
RETURN
CALCULATE ( Aggregation_col,
hist_date >= _prvdt && hist_date <= _currdt)thanks guys
I was able to figure this out, thanks to other contributors.
basically SELECTEDCALUE cannot be used for creating a Custom Column or even a even creating a table. It can only be used in a Measure.
So I created measures for all my facts and replaced them in the historic graphs of my report and it worked like a charm.
Measure =
var _currdt = SELECTEDVALUE ( User selected date)
var _Prvdt = DATE(YEar (_currdt), MONTH (_currdt) -12, DAY(_currdt))
RETURN
CALCULATE ( Aggregation_col,
hist_date >= _prvdt && hist_date <= _currdt)
thanks guys