Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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!
Solved! Go to Solution.
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]
)
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.
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.
I've 2 measures
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?
*FLM, FTE and Agency are Employee types and row header denotes the Section names
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
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]
)
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.
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.
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! | |
| #proudtobeasuperuser | |
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!