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
Mannai
Helper I
Helper I

can i use a measure as filter

So i have calculated the seniority for every employee dynamiclly where "Seniority nb = Current Date - First Date of Work" , then i used another measure to show the seniority description : seniority level =if Seniority nb between 1 and 3 => Junior // if between 3 and 5 Advanced and so on.

Is there a way i can filter the total number of employee using the measure "seniority level" ??

Thank you in advance.

1 ACCEPTED SOLUTION

It depends on what you're trying to show. As long as the employee is part of the visual then it should work, but I think they would be necessary to provide the context for the measure calculation.

If you were looking to provide totals of the different seniority levels then I think you would need a different measure

View solution in original post

7 REPLIES 7
johnt75
Super User
Super User

It would only be calculated during data refresh, so you would need to schedule at least a daily refresh of the data

Yes that's true but it doesnt help to show the average of seniority for previous years 

The only way I can think of to do it with measures is to create a disconnected table containing all the possible text values that could be returned by the measure, use that table as a slicer and create a second measure which returns 1 if the current value of the measure matches SELECTEDVALUE of the table. Not the most efficient but it should work.

I used this tutorial and it works perfectly but is it possible to use this in a visual and not a table ? 
https://youtu.be/AHiCE1N0XHE

It depends on what you're trying to show. As long as the employee is part of the visual then it should work, but I think they would be necessary to provide the context for the measure calculation.

If you were looking to provide totals of the different seniority levels then I think you would need a different measure

johnt75
Super User
Super User

I don't think you can use a measure which returns a text value as a filter, I think you can only use numeric measures as filters.

However, given that the seniority of employees seems unlikely to be affected by slicers or filters, you could add them both as calculated columns instead of measures and then you would be able to filter on them.

the problem is that the calculated column is not changing when i change the date

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!

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