Forum Discussion
LookupValue as a Calculated Measure
- Anonymous3 years ago
Hi Anonymous ,
Please refer to my pbix file to see if it helps you.
Create a measure.
Measure = VAR _3 = CALCULATE ( MAX ( 'Table'[ABS Error] ), FILTER ( ALL ( 'Table' ), 'Table'[DFU] = SELECTEDVALUE ( 'Table'[DFU] ) && 'Table'[index] = SELECTEDVALUE ( 'Table'[index] ) - 2 ) ) VAR _2 = CALCULATE ( MAX ( 'Table'[ABS Error] ), FILTER ( ALL ( 'Table' ), 'Table'[DFU] = SELECTEDVALUE ( 'Table'[DFU] ) && 'Table'[index] = SELECTEDVALUE ( 'Table'[index] ) - 1 ) ) VAR _1 = CALCULATE ( MAX ( 'Table'[ABS Error] ), FILTER ( ALL ( 'Table' ), 'Table'[DFU] = SELECTEDVALUE ( 'Table'[DFU] ) && 'Table'[index] = SELECTEDVALUE ( 'Table'[index] ) ) ) VAR _1RE = ( ( _3 * 0.6 ) + ( _2 * 0.25 ) + ( _1 * 0.15 ) ) / 1 RETURN IF ( MAX ( 'Table'[index] ) <= 1, BLANK (), _1RE )If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
A small example in Excel of what we are trying to do in PBi with the help of indexes.
Thanks
Hi Anonymous ,
Please refer to my pbix file to see if it helps you.
Create a measure.
Measure =
VAR _3 =
CALCULATE (
MAX ( 'Table'[ABS Error] ),
FILTER (
ALL ( 'Table' ),
'Table'[DFU] = SELECTEDVALUE ( 'Table'[DFU] )
&& 'Table'[index]
= SELECTEDVALUE ( 'Table'[index] ) - 2
)
)
VAR _2 =
CALCULATE (
MAX ( 'Table'[ABS Error] ),
FILTER (
ALL ( 'Table' ),
'Table'[DFU] = SELECTEDVALUE ( 'Table'[DFU] )
&& 'Table'[index]
= SELECTEDVALUE ( 'Table'[index] ) - 1
)
)
VAR _1 =
CALCULATE (
MAX ( 'Table'[ABS Error] ),
FILTER (
ALL ( 'Table' ),
'Table'[DFU] = SELECTEDVALUE ( 'Table'[DFU] )
&& 'Table'[index] = SELECTEDVALUE ( 'Table'[index] )
)
)
VAR _1RE = ( ( _3 * 0.6 ) + ( _2 * 0.25 ) + ( _1 * 0.15 ) ) / 1
RETURN
IF ( MAX ( 'Table'[index] ) <= 1, BLANK (), _1RE )
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous3 years agoNot applicable
thank you, it is working now 🙂