Forum Discussion
How to create Parameter (Like in Tableau) to select visualizing between two different values?
Hi,
Would appreciate guidance on creating a list parameter that could act like a slicer to allow users to choose between showing two different values (commitments or disbursements). I am used to working in Tableau which allows you to define a parameter and filter for different values.
Any helos would be greatly appreciated.
Best,
IB
Is this what you're looking for?: http://sqljason.com/2012/11/measure-selection-using-slicers-in.html
Instead of a linked table like in Excel you can use the "Enter Data"-table generator to fill in the names of the measures you want to display in your slicer.
7 Replies
- ImkeFCommunity Champion
Is this what you're looking for?: http://sqljason.com/2012/11/measure-selection-using-slicers-in.html
Instead of a linked table like in Excel you can use the "Enter Data"-table generator to fill in the names of the measures you want to display in your slicer.
- IselghanNew Member
Yes and it worked great. Thanks a lot!
- tarun16febRegular Visitor
Can you please post a workbook with the solution if possible.
- AnonymousNot applicable
I am trying to create a parameter like one we had in tableau, replicate like a simple Slicer in PowerBi so that the user can select from the dropdown. I am not sure how and if that works in PBi. My field has 2 values and I want to add 3 more and make it a parameter and display it like a slicer on the report
- hmericchanFrequent Visitor
Hi all,
Not sure if it's too late to answer this in 2024 😅
Somehow I do come across this situation today and below is my solution:
To create a custom slicer, you can either create a table by uploading one with Excel as new data source or create it directly using DAX.
For my case, as the table may change from time to time, I created it with DAX for easy maintenance:Language = DATATABLE("Language", STRING, {{"EN"}, {"ZH"}})My use case is use a language slicer to swap two different languages of Type (EN) and Type (ZH), EN as English and ZH as Chinese:Type =
IF(HASONEFILTER('Language'[Language]),SWITCH(TRUE,MIN('Language'[Language])="EN", MIN('OC Utilization & Inventory'[Type (EN)]), MIN('Language'[Language])="ZH", MIN('OC Utilization & Inventory'[Type (ZH)])),MIN('OC Utilization & Inventory'[Type (EN)]))
Hope this help 🙂