Forum Discussion
make table unaffected by slicer except one column
- 6 years ago
Anonymous , Can you use interaction instead.
https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions
Anonymous - Yes, don't have your slicer connected to your visual. (Edit Interactions) Create a measure for the one value in your visual that grabs the value(s) in the slicer and returns a result accordingly.
Greg_Deckler I am using a relative date slicer, what would be the best approach to create the meaure? If has one value?
thank you!
- Greg_Deckler6 years ago
Community Champion
Anonymous - It's really hard to say. You should be able to do something like:
Measure =
VAR __SlicerValues = 'SlicerTable'[SlicerColumn]
RETURN
...
Once you have the values, you can get the min or max of those and filter by these min's and max's or you might use IN operator. Hard to say without knowing your data and what you are trying to calculate.
- Anonymous6 years agoNot applicable
Greg_Deckler thanks for the reply.
I am just trying calculate the distinct count for a column for the period selected in the relative slicer.
so now I have a table with data and a relative slicer that is not interacting with the table (turned off the interaction).
Now I need to create the measure to do a distinct count of a column called [TransactionID] by the [CustomerID].
then when I put the measure in the table i need the relative slicer to interact with only the created measure
does that make a little more sense ?
- Greg_Deckler6 years ago
Community Champion
OK, so probably something along the lines of:
Measure = VAR __MaxSlicer = MAX('Slicer'[Column]) VAR __MinSlicer = MIN('Slicer'[Column]) RETURN COUNTX(DISTINCT(SELECTCOLUMNS(FILTER('Table',[Date] >= __MinSlicer && [Date] <= __MaxSlicer),"TransactionID",[TransactionID])),[TransactionID])