Forum Discussion
Create Slicer
- 3 years ago
You need to add the Min field to the MeasureListTable and make sure it is a number.
The SelectedMeasure should be loooking at the Min column.
SelectedMeasure = SELECTEDVALUE(MeasureListTable[Min])Then you write the filter measure and apply it as a filter on your table.
Filter Measure = VAR _Days = [SelectedMeasure] RETURN CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( VALUES ( 'Table'[DifferenceDays] ), 'Table'[DifferenceDays] >= _Days ) )I have attached your file with my updates.
We can add a selection table that has the minimum days in it to use as a filter. Create a new table with this dax code.
Days Filter =
DATATABLE (
"Days Range", STRING,
"Min", INTEGER,
{
{ "All", 0 },
{ "> 60 days", 60 },
{ "> 100 days", 100 },
{ "> 900 days", 900 }
}
)
Then a measure to read the selection
Selected Option = SELECTEDVALUE ( 'Days Filter'[Min], 0 )
Then the mesure that will filter the table.
Filter Measure =
VAR _Days = [Selected Option]
RETURN
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( VALUES ( 'Table'[DifferenceDays] ), 'Table'[DifferenceDays] >= _Days )
)
You can add that measure to the visual, set a filter on the field to [Filter Measure] is not blank.
You can then remove the [Filter Measure] from the table and it will keep the filter.
I have attached my sample file for you to look at.
- koorosh3 years agoPost Partisan
Thank you for your reply. I should read it carefully so please give me time.
Meantime could you please check my attached file and let me know which command I should add to the switch command in 'Dynamicmeasure' measure so that it filters the table visual based on the selected vaule?Thanks in advance.