Forum Discussion
admiralman
Advocate II
8 years agoMeasure and Data Type
i have a measure that uses the selected value of a slicer to determine which calculation (data point) it will return. See below. The issue is that I want A% to return a number to the 100ths decim...
v-yuta-msft
Community Support
8 years agoHi admiralman,
Modify your measure like pattern below and check if it can meet your requirement.
DPs =
VAR yr =
YEAR ( NOW () )
RETURN
SWITCH (
SELECTEDVALUE ( MeasureDDL[Measure] ),
"A", CALCULATE ( [MeasureA], Data[yr] = yr ),
"B", CALCULATE ( [MeasureA], Data[yr] = yr ),
"A%", CALCULATE ( [MeasureAPercent], Data[yr] = yr )
* 100
&& "%",
0
)
Regards,
Jimmy Tao