Hi–I have been working on this for SEVERAL weeks now, and not getting everything working like I would like for it to.
Basically, I have a table like this.
You select a city from the City Name Slicer-this is the city you want to compare, then select the Fiscal Year and the Mile Radius from the City.
What I am wanting to do is to filter the table for Tax Revenue that is included in the table–in this example, I want a slicer to show between $137 and $16,812,407.
I have watched the video by Parker with BI Elite multiple times. Filter by a Measure in a Slicer.
In this video, Parker creates 3 items.
1)generate series with to create a table from 0 to the max value of his Total Sales measure.
2)creates a Measure Filter to filter the table
3)Creates a Slicer Filter to filter the Slicer
This works up to a point. In the video, Parker has Date and Sales values. In my table, I have many more columns.
When I do the generate series, I use the following
Tax Revenue Number Filter = GENERATESERIES(0, [Tax Revenue], 10000 )
In this, the generate series is creating values across the ENTIRE dataset-which includes multiple cities and multiple years and their tax revenues, which is way too large.
So the first question–how do I limit the generate series formula to only generate the series based on my selections?
I then created a Measure Filter–this appears to be working
Tax Revenue Measure Filter =
VAR MinValue = min('Tax Revenue Number Filter'[Value])
VAR MaxValue = Max('Tax Revenue Number Filter'[Value])
VAR CurrentMeasureValue = [Tax Revenue]
RETURN
If(CurrentMeasureValue >= MinValue && CurrentMeasureValue <= MaxValue,1,0)
When I try to create the measure for the Slicer Filter, I am unable to summarize all the columns of my table. The column that I am having problem with is the one coming from the Tbl1City column for the City Name. This is the measure as I have it so far.
Tax Revenue Slicer Filter =
VAR Virtual =
SUMMARIZE(
dDate[Fiscal Year],
"Distance",[Distance],
"Distance from city",[Distance],
"Dist In Miles", [Distance in Miles],
"Tax Revenue", [Tax Revenue]
)
VAR MinValue = MINX(Virtual,[Tax Revenue])
VAR MaxValue = MAXX(Virtual,[Tax Revenue])
Var CurrentSlicerValue = SELECTEDVALUE('Tax Revenue Number Filter'[Value])
RETURN
if(CurrentSlicerValue >= MinValue && CurrentSlicerValue <= MaxValue, 1, 0)
I am not able to get this slicer filter to work at all. When put in the filter section of the slicer and say is = to 1, it doesn’t filter the slicer or the table.
Any suggestions would be appreciated. I am not a programmer, so I know that there may be issues with some of my tables. If you have suggestions on how I can fix them to work better, I am open to that as well.
Thank you all in advance for your time.
My File is attached. This is just a demo file, so there are other items that do not apply.
#Filter a Slicer by a Measure
Filter a Measure by a Slicer.pbix (18.6 MB)
#Dax