Forum Discussion
Remove blanks from Parameter Fields
- 1 year ago
Create a table with a single column that will act as a toggle for the filter:
FilterToggle = DATATABLE(
"Filter", STRING,
{
{"On"},
{"Off"}
}
)Create a measure that checks the value of the parameter and applies the filter conditionally:
ApplyFilter =
IF(
SELECTEDVALUE(FilterToggle[Filter]) = "On",
IF(
NOT(
ISBLANK('Incident Input'[Incident Type]) ||
ISBLANK('Incident Input'[Incident Year]) ||
ISBLANK('Incident Input'[Law Enforcement Agency])
),
1,
0
),
1
)Add a slicer to your report using the FilterToggle table.
Drag the ApplyFilter measure to the Filters pane of your visual.
Set the filter to show only values where ApplyFilter is 1.
Create a table with a single column that will act as a toggle for the filter:
FilterToggle = DATATABLE(
"Filter", STRING,
{
{"On"},
{"Off"}
}
)
Create a measure that checks the value of the parameter and applies the filter conditionally:
ApplyFilter =
IF(
SELECTEDVALUE(FilterToggle[Filter]) = "On",
IF(
NOT(
ISBLANK('Incident Input'[Incident Type]) ||
ISBLANK('Incident Input'[Incident Year]) ||
ISBLANK('Incident Input'[Law Enforcement Agency])
),
1,
0
),
1
)
Add a slicer to your report using the FilterToggle table.
Drag the ApplyFilter measure to the Filters pane of your visual.
Set the filter to show only values where ApplyFilter is 1.