Forum Discussion
Anonymous
7 years agoNot applicable
Fixed & Dynamic Values with Slicer
Hi, So I am currently struggling with a problem where I am trying use a slicer to filter a column of values, whilst also always keeping a value (not included in the slicer). A simplified exam...
- Anonymous7 years ago
I managed to solve my problem but I feel like it is a non-optimal solution.
I did this by creating a calculated table and 3 measures:
slic = DISTINCT('Table'[Category]) // This is linked to the main tableFixed Measure = CALCULATE(SUM('Table'[Value]), FILTER('Table', 'Table'[Category] == "Fixed"))Swap Measure = SUM('Table'[Value])Resulting Measure = CALCULATE([Fixed Measure], ALL(slic[Category])) + [Swap Measure]The resulting measure column is what I was looking for, when you are slicing by the new "slic" table. If anyone has any recomendations that can implement the same functionality in an improved way please let me know.
Anonymous
7 years agoNot applicable
I managed to solve my problem but I feel like it is a non-optimal solution.
I did this by creating a calculated table and 3 measures:
slic = DISTINCT('Table'[Category]) // This is linked to the main table
Fixed Measure = CALCULATE(SUM('Table'[Value]), FILTER('Table', 'Table'[Category] == "Fixed"))
Swap Measure = SUM('Table'[Value])
Resulting Measure = CALCULATE([Fixed Measure], ALL(slic[Category])) + [Swap Measure]
The resulting measure column is what I was looking for, when you are slicing by the new "slic" table. If anyone has any recomendations that can implement the same functionality in an improved way please let me know.