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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.