Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I created a measure that I want to add as a filter, but it will not filter correctly. I want to filter instructor > 15 surveys.
SurveyMeasure = CALCULATE(COUNT(SurveyAnalysis[Account]), ALL(SurveyAnalysis), VALUES(SurveyAnalysis[Instructor]))
Thank you so much
Solved! Go to Solution.
Try using this measure as a filter:
filter = IF([Surveys] > 15, 1)
add it as a filter and set the value to = 1
Proud to be a Super User!
Paul on Linkedin.
It will still work. Create the measure:
Filter Surveys = IF(COUNT(Table[Surveys]) > 15, 1)
and add it to the filter for the visual in the filter pane and set the value to 1.
See this example
My filter measure:
Filter Count =
IF(COUNT(Sales[Actuals]) >100, 1)
Proud to be a Super User!
Paul on Linkedin.
Thank you so much for the quick response. Sorry if I confuse you, I don't want to hard code the number (I took 15 as an example.)
I just want users to type XX number of surveys in the filter. Is there any way I can change the hard code number to be the dynamic or user-entered number?
Thank you so much
Sure. First create a table to use as the slicer. Under Modeling in the ribbon, select new table and type in
Count Slicer =
VAR _Max =
MAXX (
VALUES ( SurveyAnalysis[Instructor] ),
CALCULATE ( COUNT ( SurveyAnalysis[Account] ) )
)
RETURN
GENERATESERIES ( 1, _Max, 1 )
This creates a table of continuous values from 1 to the max count of accounts. In my example, I've called the table 'Count Slicer'
Create a slicer from this table, and in the dropdown, select "Greater or equal to "
Now create the measure to use as the filte:
Count by slicer =
VAR _Min =
MIN ( 'Count Slicer'[Value] )
VAR _Count =
COUNT ( SurveyAnalysis[Account] )
RETURN
COUNTROWS (
CALCULATETABLE (
VALUES ( SurveyAnalysis[Instructor] ),
FILTER ( SurveyAnalysis, _Count > _Min )
)
)
Add the measure to the filter pane and set the value to = 1
To get
Proud to be a Super User!
Paul on Linkedin.
@PaulDBrown
Thank you so much. I never thought this would be a little complex and without you, I will never figure it out. Again, thank you so much, this works for me.
Try using this measure as a filter:
filter = IF([Surveys] > 15, 1)
add it as a filter and set the value to = 1
Proud to be a Super User!
Paul on Linkedin.
Thank you for the response, I can not add Surveys to the filter. It's just a field that does a count. That's why I created a measure.
I want to measure to select values, I mean >15 or some other number.
Any idea? Thank you so much
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |