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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Use measure as filter

Hi everyone!

 

I'm trying to filter a table by a value that is stored in a measure. I'm not being able to do it. Is it even possible?

 

For example: I want to show in a visualization just the accounts where the doc type is "AA". This doc type "AA" is stored in the measure.

 

I know I could do it directly from the "Filter" section, but this dashboard is going to be used in different places, and the doc type may have a different value. I want to make the customization as user friendly as possible.

 

I'll appreciate any help.

Thank you!

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

Measure cannot be used as a slicer, but a similar effect can be achieved in other ways:

Switch =
SWITCH (
    SELECTEDVALUE ( Table_2[Date] ),
    DATE ( 2022, 01, 01 ), [Measure1],
    DATE ( 2022, 01, 02 ), [Measure2],
    DATE ( 2022, 01, 03 ), [Measure3]
)

vhenrykmstf_2-1652771940137.png

 

 

vhenrykmstf_0-1652771907230.pngvhenrykmstf_1-1652771924113.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Syndicate_Admin
Administrator
Administrator

I used the mentioned formula and it came out, but I have a detail. Is that the option is for single selection, but if I want to select several options of the filter, would there be way? I looked for other alternatives, but I was not given.

Anonymous
Not applicable

I've 2 measures

  • Utilization of Employees

aishrajan_1-1661248896791.png

  • Status (If they have achieved targeted utilization or not). In this case, 1 = Greater than or equal to Target; 2 & 3 = less than target

aishrajan_2-1661249718933.png

 

I want a visual which should give count of Employees who are less than the target (when status = 2 / 3). Can someone help me to arrive this?

aishrajan_0-1661247995011.png

*FLM, FTE and Agency are Employee types and row header denotes the Section names

v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

Thanks for your feedback.

 

If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Best Regards,
Henry

v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

Measure cannot be used as a slicer, but a similar effect can be achieved in other ways:

Switch =
SWITCH (
    SELECTEDVALUE ( Table_2[Date] ),
    DATE ( 2022, 01, 01 ), [Measure1],
    DATE ( 2022, 01, 02 ), [Measure2],
    DATE ( 2022, 01, 03 ), [Measure3]
)

vhenrykmstf_2-1652771940137.png

 

 

vhenrykmstf_0-1652771907230.pngvhenrykmstf_1-1652771924113.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks for your help. It was very clear. But I had some troubles with it so I decided to use a new input with the info I wanted to store in the measure and it's working. 

Thanks again.

tackytechtom
Super User
Super User

Hi @Anonymous ,

 

You cannot use a measure directly in a slicer. However, there are some workarounds available. Have a look in here:

Solved: Cannot use measure in slicer - Microsoft Power BI Community

Power BI - Filter by a Measure in a Slicer - YouTube

 

Let me know if this works, or in case you get stuck somewhere.

 

Please, accept this answer as solution, if it solves your issue 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Anonymous
Not applicable

Thanks for the suggestion. I couldn't make it work so far, but I managed to solve it for now by using a new input with the info that I wanted to store in the measure. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors