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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
devGV_88
Helper I
Helper I

Use slicer value/s as a filter in a measure

Hi folks,

 

I looking for a way to capture the values selected in a slicer.

I tried with VALUE, VALUES and SELECTED VALUES, but did not work...

 

This is my calculated table, where I want to sum the total by date/hour... And the dinamic filter should be the City.

Using {"USA"} works, and more than one city. But I need replace it withthe value from the slicer selection (1 or more than 1 city...)

 

devGV_88_0-1713465911985.png

 

1 ACCEPTED SOLUTION

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1713672186049.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Pravin_
Regular Visitor

Are you storing this calculated table in the model as a physical table?

In this case I don't think it will be interactive with slicers on the report page

Greg_Deckler
Super User
Super User

@devGV_88  In your FILTER use [City] IN DISTINCT('SlicerTable'[Value])

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler 

 

I tried it, but I got this error: A table of multiple values was supplied where a single value was expected.

@devGV_88 Can you post sample data?

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Let me know if works...

ExampleFile 

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1713672186049.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Greg_Deckler
How can I attach the pbix?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.