cancel
Showing results for 
Search instead for 
Did you mean: 
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
Responsive Resident
Responsive Resident

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

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

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
Responsive Resident
Responsive Resident

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

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors