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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Anonymous
Not applicable

What is a return of selectedvalue if none is selected but the slicer is showing all?

Hello!

 

I have 17 regions in the Region column and I need to create a table with dynamic names. For slicer I have activated "Multiple Choice with CTRL", it means that If nothing is selected, the values will be shown for all regions. Here comes my question: How can I write in DAX, if nothing selected my table name is: Entire country, otherwise region names from the slicer.

 

so far I tried:

 

IF((SELECTEDVALUE('Region')), "Entire country", SELECTEDVALUE('Region')))
6 REPLIES 6
NidhiBhusari
Helper IV
Helper IV

@Anonymous Do you want to Dynamically change the Heading  as per the selection from slicer? If Yes,then you can try below dax:_

Text = IF(ISFILTERED('TableName'[ColumnName]), SELECTEDVALUE('TableName'[ColumnName]),"Entire Countries")
 
Anonymous
Not applicable

In my slicer options are selected with CTRL, if there is no selection it shows "ALL". with your dax equation the result empty if i do not select region, but if I select it works. So I want, if slicer shows me "ALL" I want to see "Entire country" name on my table, otherwise selected region names.

@Anonymous I have implemented same scenario, I have used Genre related dataset.

NidhiBhusari_0-1624096156165.png

 

NidhiBhusari_1-1624096181763.png

for me it is working...can you share your .pbix file?

for me is not

 

FrankAT
Community Champion
Community Champion

Hi @Anonymous ,

with a slicer, something is always selected! For the selection "Select all" there are two settings in the slicer (see figure). Combinations of the slicer selection can be executed with the CTRL key. If you want to get the selected values use the above measure CONCATENATEX(...).

 

19-06-_2021_00-13-57.png

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

Anonymous
Not applicable

Thanks for your reply. I got your idea, but I do not need all these city names, I want to have only one name. For example for your data: Germany.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.