Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |