Forum Discussion
visheshjain
Impactful Individual
3 years agoFilter Slicer from Measure values
Hello eveyone,
I have 3 tables. Calendar, Sale and Parameter.
Parameter has values ranging from 1-24, which are the number on months I want to go back.
I am trying to filter a slicer which has ...
johnt75
Super User
3 years agoIs Visible =
VAR CurrentDate = MAX('Calendar'[Date])
VAR Step1 = [1 Step]
VAR Step2 = [2 Step]
RETURN IF( CurrentDate >= Step2 && CurrentDate <= Step1, 1, 0)
gives the correct values in the table, but it doesn't play nicely with the slicer. If I add it as a filter on the slicer then you can't select any dates at all. Not sure what's going on.
lbendlin
Super User
3 years agoShow your data model/post a sample pbix. Most likely the calendar table needs to be disconnected.
- visheshjain3 years ago
Impactful Individual
Hi lbendlin,
I have shared a sample file in message 13 of the thread. Sharing it again in this post.
If the calendar table is diconnected, then it will not be able to filter out data from the fact tables.
Here is a look at the data model. It is quite basic.
- lbendlin3 years ago
Super User
Your measure are a little too complex. Use these instead:
1 Step = EOMONTH(CALCULATE ( MAX ( 'Sales'[Sale Date] ), ALL () ),-1) 2 Step = EOMONTH([1 Step], - [Parameter Value] ) + 1 - visheshjain3 years ago
Impactful Individual
Hi lbendlin,
Changed the measures but still, its not working with filtering the slicer.
Attaching my file again.