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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
lukham
New Member

Use active slicer filter in measure

Hi,

 

I am trying to create a table with dates and values. The value is the same for each day and depends on the selected values of a slicer (single selection).

 

I tried to use the ALLSELECTED function but it ignores the slicer.

 

So I thought using a FILTER should work:

 

 

KPI_Targets = 
  VAR BaseCalendar =
    CALENDAR(DATE(2019,4,1), DATE(2021,31,12))
  RETURN
    GENERATE(
      BaseCalendar,
      VAR BaseDate = [Date]
      VAR Target = 
        CALCULATE(
          COUNT(Equipments[Id])/365,
          FILTER(Locations,[Title]=SELECTEDVALUE(Locations[Title]))
        )
     RETURN ROW(
       "Target",Target
     )
   )

 

 

 

On its own, SELECTEDVALUE(Locations[Title]) gives me the correct result but when I use it inside the formula above it does not work.

 

Any hints?

 

Thanks,

Lukas

3 REPLIES 3
amitchandak
Super User
Super User

@lukham , You can not use slicer value in the creation of a new table. They will act like static value

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak thanks for letting me know. Do you have an idea how I can achieve my goal (creating a table with dates in column 1 and a fixed value based on a slicer selection in column 2) instead?

@lukham , You can use Min/Max value of the table

Or you can create a var table in measure there you will able to use

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.