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.
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?
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
Hi @nothingman
I think
SELECTEDVALUE (SlicerTable[SlicerColumn])
should work if you select only one value in the slicer.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |