Forum Discussion
juan_pablo
6 years agoHelper V
Simple ALLEXCEPT
Hi, Why this simple measure in a single table doesn't works? No matter which option in the slicer of the variable "NOMBRE CORTO" y choose, the measure Prueba2 always shows the same number (16138) w...
- 6 years ago
Hi,
Thank you all for your replies but the real reason why it doesn't work is as follow:
ALLEXCEPT behaves as described in the documentation only when it's used as a filter argument in CALCULATE, otherwise it would return the table of its first argument without/except the columns in the subsequent arguments.
A way to prove this, is look at the ALL function that behaves the same way: A single ALL returns all the table of its argument, and the ALL as a filter argument in CALCULATE removes the filters on all the columns of the table.
Two completely different behaviors depending on the context of the function.
…DAX and his ambiguities.
az38
6 years agoCommunity Champion
Hi juan_pablo
it depends on your data model but try to use
Prueba2 = CALCULATE(COUNTROWS('Códigos x Parada'), ALLEXCEPT('Códigos x Parada', 'Códigos x Parada'[NOMBRE CORTO]))