Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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
User | Count |
---|---|
98 | |
75 | |
69 | |
49 | |
26 |