The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have created a desktop power bi report. In desktop, you can easily filter with wildcards. I've created a parameter (department) in desktop. This parameter lists all the departments and you check the boxes next to the departments you want. This is cumbersome because there are hundreds of departments. Is there a way to create a parameter where users will enter the data and can use a wildcard?
Solved! Go to Solution.
Hi @vinhhuynh55 - Power BI Desktop does not support wildcard parameter filtering directly in the slicer UI but we can acheive the same with some dax measure.
Try the below logic
For testing , I have create a filterInput column with empty string "" named with table Filter Table, you can replace as your own tables.
you can replace the department table and field too as per your table details. here i am using containstring function to simulate the wild card search.
DepartmentFilter =
VAR FilterInput = SELECTEDVALUE(FilterTable[FilterInput], "")
VAR FilterPattern = "*" & LOWER(FilterInput) & "*"
RETURN
IF(
ISBLANK(FilterInput),
TRUE,
CONTAINSSTRING(LOWER(Departments[DepartmentName]), FilterPattern)
)
Try the above and let know.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi @vinhhuynh55 - Power BI Desktop does not support wildcard parameter filtering directly in the slicer UI but we can acheive the same with some dax measure.
Try the below logic
For testing , I have create a filterInput column with empty string "" named with table Filter Table, you can replace as your own tables.
you can replace the department table and field too as per your table details. here i am using containstring function to simulate the wild card search.
DepartmentFilter =
VAR FilterInput = SELECTEDVALUE(FilterTable[FilterInput], "")
VAR FilterPattern = "*" & LOWER(FilterInput) & "*"
RETURN
IF(
ISBLANK(FilterInput),
TRUE,
CONTAINSSTRING(LOWER(Departments[DepartmentName]), FilterPattern)
)
Try the above and let know.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
User | Count |
---|---|
71 | |
64 | |
62 | |
50 | |
28 |
User | Count |
---|---|
117 | |
75 | |
62 | |
54 | |
43 |