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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register 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
Most Valuable Professional
Most Valuable Professional

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.