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
Anonymous
Not applicable

How to know if the user selected something on a slicer?

Hello everyone, 

 

I have a slicer on my report and a gauge that is filtered according to the selected value on the slicer. However if nothing is selected on the slicer then the value in the gauge correspodns to the first value on the slicer. I have a measure:

 

SelectedValue = FIRSTNONBLANK(Table[Column], Table[Column])

With this I get the selected value from the slicer. What I want is the following, if I don't select anything then the value on the gauge would be calculated for all the data. Here is an example

Screenshot_1.jpg

I want this measure to be calculated for both option 1 and option 2 if i have neither option selected. How can I do that? Any advice is welcomed.

Thanks 🙂

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks @v-shex-msft, but I used the ISFILTERED() function to see if I have anything selected on the slicer. 

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

>>I want this measure to be calculated for both option 1 and option 2 if i have neither option selected. 

You can try to use below formula:

 

Measure:

 

CalculatWithSlicer= Calculate(expression,AllSelect(Table[Column]))

 

 

Sample:

SumOfSlicer= Calculate(Sum(Table[Amount]),AllSelect(Table[Column]))

AvgOfSlicer= Calculate(Average(Table[Amount]),AllSelect(Table[Column]))

 

 

Regards,

Xiaoxin SHeng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Thanks @v-shex-msft, but I used the ISFILTERED() function to see if I have anything selected on the slicer. 

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.