Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi 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.
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.
@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/
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |