Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Ania26
Helper III
Helper III

Remove blanks from Parameter Fields

Hello ,

 

I have Paramter:

Parameter = {
    ("Incident Type", NAMEOF('Incident Input'[Incident Type]), 0),
    ("Incident Year", NAMEOF('Incident Input'[Incident Year]), 1),
    ("Law Enforcement Agency", NAMEOF('Incident Input'[Law Enforcement Agency]), 2)
 
Each of this column cointains blank values. How to create a filter then can be applied or not, to remove blank values from the graph?
1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Ania26 

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.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

7 REPLIES 7
Ania26
Helper III
Helper III

Hello, this works but when I want to show it by year then it filters data icorrectly : 
OFF:

Ania26_0-1748512907268.png

ON: 

Ania26_1-1748512931939.png

 

Hi @Ania26 ,
Apologies for the inconvenience you're facing.
To assist you more effectively, we kindly request that you share sample data that fully represents your issue or question in a usable format (e.g., Excel or CSV), rather than as a screenshot.

  

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Please show the expected outcome based on the sample data you provided.


How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Hi @Ania26 ,

We haven’t heard back from you regarding the issue mentioned above. To investigate further and provide an accurate resolution, could you please share sample data or details of the scenario? This will help us analyze the problem more effectively and get back to you with the results.

Thank You !!

Hi @Ania26 ,

To assist you more effectively, we kindly request that you share sample data that accurately reflects the issue you're facing. This will help us better understand your scenario and provide a more targeted solution.

If we don’t receive any additional information, we may close this thread in line with our community guidelines,  However, you’re always welcome to post a new query anytime in the Fabric Community if you need further support.

Looking forward to your response!
Thank you for being an active part of the Microsoft Fabric Community


Ania26
Helper III
Helper III

Hello, I have below error: A single value for column 'Subject State' in table '* Subject State' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

@Ania26 , Try using

DAX
ApplyFilter =
IF(
SELECTEDVALUE(FilterToggle[Filter]) = "On",
IF(
NOT(
ISBLANK(MIN('Incident Input'[Incident Type])) ||
ISBLANK(MIN('Incident Input'[Incident Year])) ||
ISBLANK(MIN('Incident Input'[Law Enforcement Agency]))
),
1,
0
),
1
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






bhanu_gautam
Super User
Super User

@Ania26 

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.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.