Forum Discussion
Lookupvalue error
- 1 year ago
Hi Dev-001
In direct query mode, you would not be able to create a calculated column.
You need to use power query merging and conditional column to handle if logic.If you prefer to use a measure instead of a calculated column, you can create a measure that performs the lookup:
Desc. Service Level Measure = IF( ISBLANK(SELECTEDVALUE('TableExp_M 2'[Shipment No])), BLANK(), CALCULATE( MAX('Table SL 2'[s]), FILTER( 'Table SL 2', 'Table SL 2'[Row Labels] = SELECTEDVALUE('TableExp_M 2'[Service Level_1]) ) ) )Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz - 1 year ago
Need to place Shipment No , Service Level 1 in table rows or in slicer selection. Other wise selectedvalue will return nothing and in result you will get blank values.
Hi Dev-001
In direct query mode, you would not be able to create a calculated column.
You need to use power query merging and conditional column to handle if logic.
If you prefer to use a measure instead of a calculated column, you can create a measure that performs the lookup:
Desc. Service Level Measure =
IF(
ISBLANK(SELECTEDVALUE('TableExp_M 2'[Shipment No])),
BLANK(),
CALCULATE(
MAX('Table SL 2'[s]),
FILTER(
'Table SL 2',
'Table SL 2'[Row Labels] = SELECTEDVALUE('TableExp_M 2'[Service Level_1])
)
)
)
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
- Dev-0011 year agoRegular Visitor