Forum Discussion
Select a specific value from a table
- Anonymous3 years ago
Hi Power_Krille ,
SELECTEDVALUE function not suitable to handle the row context that mixed with multiple records. (it will return blank when you use it on aggregate multiple row contexts)
If you want to use these expression without column A, you can try to create a variable table with current category and correspond A value and use them to get corresponding Value from the segmentation table, then you can do aggregate with these results:
Picked Value = VAR summary = SUMMARIZE ( ALLSELECTED ( Table ), [Category], [A], "Result", MAXX ( FILTER ( ALLSELECTED ( 'Value Table' ), 'Value Table'[Fr] <= currVal && 'Value Table'[To] >= currVal ), [value] ) ) RETURN SUMX ( summary, [Result] )Regards,
Xiaoxin Sheng
Hi Power_Krille ,
SELECTEDVALUE function not suitable to handle the row context that mixed with multiple records. (it will return blank when you use it on aggregate multiple row contexts)
If you want to use these expression without column A, you can try to create a variable table with current category and correspond A value and use them to get corresponding Value from the segmentation table, then you can do aggregate with these results:
Picked Value =
VAR summary =
SUMMARIZE (
ALLSELECTED ( Table ),
[Category],
[A],
"Result",
MAXX (
FILTER (
ALLSELECTED ( 'Value Table' ),
'Value Table'[Fr] <= currVal
&& 'Value Table'[To] >= currVal
),
[value]
)
)
RETURN
SUMX ( summary, [Result] )
Regards,
Xiaoxin Sheng