Forum Discussion
Iselghan
9 years agoNew Member
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...
- 9 years ago
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.
hmericchan
2 years agoFrequent 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:
Hope this help 🙂
Type =
IF(HASONEFILTER('Language'[Language]),
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 🙂