Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello, I am wanting to use a measure inside a visual filter - and have seen referenced numerous times.
Below is my measure - returning either a 0 or 1. The measure works as expected when viewed from a Card Visual
CostCalculatorHOVFilter = if(HASONEVALUE(CostCalculatorGroup[CostCalculatorGroup]),1,0)
However, when I place as a visual filter, I have no option to change (or enter) the criteria or value (circled in red)
I have seen this filter demonstrated in numerous videos, and in my forum research, one interesting solution was to change the form. I was unable to follow the logic.
I have also attempted a true/false filter but no success.
Any quick thoughts on how I might move forward?
thank you!
Solved! Go to Solution.
I apologize for the confusion. When you add a measure to the visual filters pane and select it, you should see a list of filter options displayed below the measure name. These options will vary depending on the type of data that the measure is returning.
For example, if the measure is returning a numeric value, you might see options such as "Greater than or equal to" or "Less than or equal to". If the measure is returning a text value, you might see options such as "Contains" or "Does not contain".
If you are unable to select these options or enter a value, it could be that the measure is not returning the expected data type. For example, if the measure is returning a text value, but the filter options are expecting a numeric value, the options will not be selectable.
To resolve this issue, you can try changing the data type of the measure by using the DAX function CONVERT, or by using the Format property in the Modeling tab of the Power BI ribbon.
I hope this helps!
HASONEFILTER or HASONEVALUE are useful for total lines or heirarchy (and in that case I'd put inside the calculating measure). Your measure itself should be able to not bring categories for which the measure is empty.
In any case here a great video on how to use measure filters:
https://www.youtube.com/watch?v=Ss5L7jXIhso
I apologize for the confusion. When you add a measure to the visual filters pane and select it, you should see a list of filter options displayed below the measure name. These options will vary depending on the type of data that the measure is returning.
For example, if the measure is returning a numeric value, you might see options such as "Greater than or equal to" or "Less than or equal to". If the measure is returning a text value, you might see options such as "Contains" or "Does not contain".
If you are unable to select these options or enter a value, it could be that the measure is not returning the expected data type. For example, if the measure is returning a text value, but the filter options are expecting a numeric value, the options will not be selectable.
To resolve this issue, you can try changing the data type of the measure by using the DAX function CONVERT, or by using the Format property in the Modeling tab of the Power BI ribbon.
I hope this helps!
Hi @Dellis81,
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
It sounds like you want to use the CostCalculatorHOVFilter measure as a visual filter in a Power BI report.
To use a measure as a visual filter in Power BI, you need to do the following:
Once you have done these steps, the visual will be filtered based on the criteria that you set for the measure.
If you are unable to see the measure in the list of available filters in the visual filters pane, make sure that the measure is being displayed in the Fields pane for the table or matrix that the visual is based on. If the measure is not listed in the Fields pane, you can add it by right-clicking on the table or matrix and selecting "Add Measure".
I hope this helps! Let me know if you have any questions.
Thanks for the response... Yes, I understand the steps needed, but your step 4 is where I get hung up. The visual filter drop down options are not selectable nor am I able to enter a selection criteria. The items circled in red in original post are not selectable/actionable.
@Dellis81 hey can you let me know how you were able to open the dropdown "is less than"
Hello, your filter measure can be added on the visual filter pane. Otherwise in case of column, you have the possibilty to choose in filter pane, advanced filtering, there you'll find it
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
106 | |
68 | |
48 | |
44 | |
42 |