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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
GJ217
Resolver III
Resolver III

FILTER VALUES bringing blank result

Hi All,

 

The following DAX measure is bringin back blank when I added it to a table visualisation.

 

Leaver2 = CALCULATE(COUNTROWS(Person),FILTER(VALUES(Person[EmploymentStatus]),Person[EmploymentStauts]="Inactive"))

 

I've baccically created a cusom column called EmploymentStatus which uses an if statement that says in the Termiantion Daste is null then the value should be "Active" otherwise "Inactive" and I've inlcuded this in my measure above to get a count of leavers each month .

 

Can anyone see what I've done that it brings back no values at all?

 

1 ACCEPTED SOLUTION
marcelsmaglhaes
Super User
Super User

Hey @GJ217 ,

 

 First of all, I recommend that you create your Status column on Power Query (you can use the Conditional Column).
After that, the mesaure to count the values of the Inactive can be like:

count_inactives = CALCULATE(COUNTROWS(Manager),FILTER(Manager, Manager[Status] = "Inactive"))
*** manager is my table name

 

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

 

Regards,
Marcel Magalhaes

 

marcelsmaglhaes_0-1659732015148.png

marcelsmaglhaes_2-1659732364449.png


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!



View solution in original post

4 REPLIES 4
GJ217
Resolver III
Resolver III

@marcelsmaglhaes 

 

Thank you for helping me with this, works fine.

Hey @GJ217 

It was a pleasure to help!

Regards, 
Marcel


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!



Anonymous
Not applicable

Hi @GJ217 ,

 

Try this measure

Leaver2 =
COUNTROWS ( FILTER ( Person, Person[EmploymentStauts] = "Inactive" ) )

If you want to remove context filters from columns and rows in the current query, add the ALL()/ ALLSELECTED().

Leaver2 =
COUNTROWS (
    FILTER ( ALLSELECTED ( Person ), Person[EmploymentStauts] = "Inactive" )
)

 

Best Regards,

ShundaSteph

marcelsmaglhaes
Super User
Super User

Hey @GJ217 ,

 

 First of all, I recommend that you create your Status column on Power Query (you can use the Conditional Column).
After that, the mesaure to count the values of the Inactive can be like:

count_inactives = CALCULATE(COUNTROWS(Manager),FILTER(Manager, Manager[Status] = "Inactive"))
*** manager is my table name

 

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

 

Regards,
Marcel Magalhaes

 

marcelsmaglhaes_0-1659732015148.png

marcelsmaglhaes_2-1659732364449.png


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.