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 August 31st. Request your voucher.
Hi Experts,
I have a requirement to display other required values along with the selected value from a slicer, example is below.
I have a slicer called Region and values in it are Central, East, West and South.
If I select any one value from slicer(Centel) by defalut the selected value(Central) will show right. Along with the selected values (Central)from slicer I need to display East & West also.
Basically If I select any vale from slicer by default East andWest also need to display.
Thanks,
Anand
HI @AnandNamburi,
It seems like you want to use the slicer to achieve a specific selector effect instead of the filter.
For this scenario, I'd like to suggest you use a disconnected table filed as the source of the slicer and write the measure formula to compare with selections and add the 'OR' logic conditions with items you mentioned. Then you can apply this measure on 'visual level filter' to filter records.
Regards,
Xiaoxin Sheng
@AnandNamburi , You can get this with a measure like this
measure =
var _sel = selectedValue(Table,Table[region])
return
if(_sel = "Central", calculate([measure], filter(all(Table[region]), Table[region] =_sel || Table[region] in {"East","West"} )),[Measure])
But this will work best when region is an independent table
measure =
var _sel = selectedValue(region,region[region])
return
if(_sel = "Central", calculate([measure], filter(Table[region], Table[region] =_sel || Table[region] in {"East","West"} )),[Measure])
Hi Amitchandak,
As you mentioned I have created a new separate table for region and joined with the original and the created the measure below but it is not working as expected.
HI @AnandNamburi,
Selectedvalue not suitable to work with aggregate values, normally it will return blank if you are trying to use it to extract multiple values.
Can you please share a pbix file with some dummy data then we can directly test and modify your expressions?
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng