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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
brcnyc
Frequent Visitor

I can't filter a calculated field

hataa.JPGHi all,

I've calculated a field and I want to filter this field by gender. I've calculated this field as follows:

 

CALCULATE (

    COUNT ( [Pers.no.] ),

    FILTER ( ALL ( 'UPDATED' ), 'UPDATED'[Data Tarihi] = MAX ( 'UPDATED'[Data Tarihi] ) )

)

 

Shortly, I wanted to see head counts of the most recent date.  And now I want to filter this calculated field by gender. It should look like "pers.no" field which shows men and women's numbers. But as you see it remains the same. What should I do? thank you.

 

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @brcnyc ,

 

If you create a measure, you can replace all with allselected.

CALCULATE (

    COUNT ( [Pers.no.] ),

    FILTER ( ALLSELECTED ( 'UPDATED' ), 'UPDATED'[Data Tarihi] = MAX ( 'UPDATED'[Data Tarihi] ) )

)

 

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

DataZoe
Employee
Employee

@brcnyc I think this may be what you are looking to do:

 

 

CALCULATE (

    COUNT ( [Pers.no.] ),

    FILTER ( ALLEXCEPT ( 'UPDATED','UPDATED'[Cinsiyet] ), 'UPDATED'[Data Tarihi] = MAX ( 'UPDATED'[Data Tarihi] ) )

)

 

 

Using the ALLEXCEPT  https://docs.microsoft.com/en-us/dax/allexcept-function-dax.

 

This should keep the Gender as a filter.

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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