Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
nothingman
Regular Visitor

Get slicer value after disabling interactions

I have a bar chart and date slicer and I disabled interaction between those two. However I would like to have possibility to reference the actual value in a slicer in a measure used with the bar chart. Is there some DAX function that would allow me to achieve this? 

5 REPLIES 5
Anonymous
Not applicable

I had a similar issue and I couldn't find an answer on this forum. In my scenario, I wanted to retrieve a selected Date while having interactions between visualizations turned off.

 

Here's the link that helped me greatly. The idea is to create a separate (disconnected) table with all unique Dates and use this field as a slicer. Afterwards, creating a measure with SELECTEDVALUE referencing this new Date field is very straightforward.

https://www.blue-granite.com/blog/disconnected-table-power-bi

Zubair_Muhammad
Community Champion
Community Champion

Hi @nothingman

 

I think

SELECTEDVALUE (SlicerTable[SlicerColumn])

 

should work if you select only one value in the slicer.


Regards
Zubair

Please try my custom visuals

The function that you've proposed doesn't work because the interaction between slicer and bar chart is turned off so SELECTEDVALUE sees all values in the date column. This is my main issue - how to get a reference to value selected on a slicer even though the interaction is turned off

Hello,

 

Were you able to fix this problem ? I am facing the same issue now and still can't fix it!

 

Thank you!

Hi @nothingman,

 

You can use:

 

If you are using the "between" option:

First selected value = CALCULATE(FIRSTDATE(DIM_DATA_2[Date]); ALLSELECTED())

Last selected value = CALCULATE(LASTDATE(DIM_DATA_2[Date]); ALLSELECTED())

 

If you are using the "list" option you can do like @Zubair_Muhammad said:

SELECTEDVALUE(DIM_DATA_2[Date]).

 

 

Ricardo

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.