Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have the following measure that works properly.
NoDelivPGDistrDPL = CALCULATE ( COUNTAX ( ZCSDLV; ZCSDLV[c1] ); DISTINCT ( ZCSDLV[c1] ); FILTER ( ZCSDLV; ZCSDLV[Cod1] = "149" ); FILTER ( ZCSDLV; ZCSDLV[Org1] = "MDCS" ); FILTER ( ZCSDLV; ZCSDLV[Pae1] = "CN" ) )
Now I need to include other FILTER() as showed below but it returns an empty value
NoDelivPGDistrDPL = CALCULATE ( COUNTAX ( ZCSDLV; ZCSDLV[C1] ); DISTINCT ( ZCSDLV[C1] ); FILTER ( ZCSDLV; ZCSDLV[Cod1] = "149" ); FILTER ( ZCSDLV; ZCSDLV[Org1] = "MDCS" ); FILTER ( ZCSDLV; ZCSDLV[Pae1] = "CN" ); FILTER ( ZCSDLV; ZCSDLV[Pae1] = "MX" ); FILTER ( ZCSDLV; ZCSDLV[Pae1] = "AR" ); FILTER ( ZCSDLV; ZCSDLV[Pae1] = "RU" ) )
I tried to use COUNTROWS instead of COUNTAX and filtering "CN" "MX" "AR" "RU" before [cod1] and [Org1] and I got always an empty values.
I know it should be easy but I did not understand how to apply a multiple filter in this case.
Could you kindly indicate to me where is the mistake'
Thanks a lot
Solved! Go to Solution.
This should work...
NoDelivPGDistrDPL = CALCULATE ( COUNTAX ( ZCSDLV; ZCSDLV[C1] ); DISTINCT ( ZCSDLV[C1] ); FILTER ( ZCSDLV; ZCSDLV[Cod1] = "149" ); FILTER ( ZCSDLV; ZCSDLV[Org1] = "MDCS" ); FILTER ( ZCSDLV; ZCSDLV[Pae1] = "CN" || ZCSDLV[Pae1] = "MX" || ZCSDLV[Pae1] = "AR" || ZCSDLV[Pae1] = "RU" ) )
This should actually give you same as above...
NoDelivPGDistrDPL = CALCULATE ( DISTINCTCOUNT ( ZCSDLV[C1] ); FILTER ( ZCSDLV; ZCSDLV[Cod1] = "149" ); FILTER ( ZCSDLV; ZCSDLV[Org1] = "MDCS" ); FILTER ( ZCSDLV; ZCSDLV[Pae1] = "CN" || ZCSDLV[Pae1] = "MX" || ZCSDLV[Pae1] = "AR" || ZCSDLV[Pae1] = "RU" ) )
But I would actually simplify even further like this...
NoDelivPGDistrDPL = CALCULATE ( DISTINCTCOUNT ( ZCSDLV[C1] ); FILTER ( ZCSDLV; ZCSDLV[Cod1] = "149" && ZCSDLV[Org1] = "MDCS" && ( ZCSDLV[Pae1] = "CN" || ZCSDLV[Pae1] = "MX" || ZCSDLV[Pae1] = "AR" || ZCSDLV[Pae1] = "RU" ) ) )
Hope this helps!
This should work...
NoDelivPGDistrDPL = CALCULATE ( COUNTAX ( ZCSDLV; ZCSDLV[C1] ); DISTINCT ( ZCSDLV[C1] ); FILTER ( ZCSDLV; ZCSDLV[Cod1] = "149" ); FILTER ( ZCSDLV; ZCSDLV[Org1] = "MDCS" ); FILTER ( ZCSDLV; ZCSDLV[Pae1] = "CN" || ZCSDLV[Pae1] = "MX" || ZCSDLV[Pae1] = "AR" || ZCSDLV[Pae1] = "RU" ) )
This should actually give you same as above...
NoDelivPGDistrDPL = CALCULATE ( DISTINCTCOUNT ( ZCSDLV[C1] ); FILTER ( ZCSDLV; ZCSDLV[Cod1] = "149" ); FILTER ( ZCSDLV; ZCSDLV[Org1] = "MDCS" ); FILTER ( ZCSDLV; ZCSDLV[Pae1] = "CN" || ZCSDLV[Pae1] = "MX" || ZCSDLV[Pae1] = "AR" || ZCSDLV[Pae1] = "RU" ) )
But I would actually simplify even further like this...
NoDelivPGDistrDPL = CALCULATE ( DISTINCTCOUNT ( ZCSDLV[C1] ); FILTER ( ZCSDLV; ZCSDLV[Cod1] = "149" && ZCSDLV[Org1] = "MDCS" && ( ZCSDLV[Pae1] = "CN" || ZCSDLV[Pae1] = "MX" || ZCSDLV[Pae1] = "AR" || ZCSDLV[Pae1] = "RU" ) ) )
Hope this helps!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.