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.
Hello everyone,
My question is : what is the simplest way to get the value of a non-numerical disconnected slicer in a DAX measure?
Disconnected tables are very useful to sensitize or perform data modelling. And it is pretty easy to create a DAX measure which computes the value choosen by the user in this disconnected table (with a MIN, MAX or Average if more than 1 value is selected in the disconnected slicer).
But how does it work for non-numerical disconnected tables ?
For example, let's say that I have a disconnected table with 1 column - 3 rows : "Red", "Blue", "Green".
I would like a DAX measure to be able to store the value (supposed to be unique here) defined by the user when using this disconnected table as a slicer in a report.
Thanks a lot !
Solved! Go to Solution.
Hi @Vvelarde
Many thanks for your reply. I didn't know this function ! Very useful.
My Final measure is :
Measure= If ( Countrows (Disconnected_Table) = 1 ; Values (Slicer_Column) ; "").
I used an If statement in case where the user selects more than 1 item in the Slicer_Column (colors here).
Thanks again.
Well actually, ' HasOneValue() ' performs the same task but is much better than ' Countrows (Disconnected_Table) = 1 ' in terms of performance
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 |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |