Forum Discussion
cosminzanfir
4 years agoFrequent Visitor
Slice value based on disconnected table with dynamic values
Hello, Is there a solution for the following problem? I have a measure ( a simple SUM) that is going to be displayed in a Matrix visual. I need to filter that value based on a selected version f...
- 4 years ago
It depends on what you are trying to achieve. If your disconnected table contains values which appear in a column in your fact table, and you want the slicer to choose only those values, you can do something like
Measure with filter = CALCULATE( [Base measure], TREATAS( VALUES('Disconnected table'[Column]), 'Fact table'[Column]) )
cosminzanfir
4 years agoFrequent Visitor
Thank you johnt75 .
I was able to resolve the issue by using SELECTEDVALUE
VAR selection =
SELECTEDVALUE ( Table[ Level 01.Key], [Plan] )
VAR selectioncalculated =
IF (
SELECTEDVALUE ( Table[ Level 01.Key]) = BLANK (),
[Plan],
CALCULATE (
[Plan],
FILTER ( Table, Table[ Level 01.Key] = selection )
)
)
RETURN
selectioncalculated