Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hola
Estoy haciendo algunos cálculos de promediación, y mis cálculos parecen estar bastante apagados. Sólo quiero pedir que se corrija por qué mi medida no parece funcionar. Mis datos son los siguientes:
En mi tabla Masterlist:
Valor de fecha del atributo del prestatario
Préstamo ABC 1/1/2019 1000
Colección ABC 1/5/2019 300
Préstamo ABC 2/5/2019 3000
Mis medidas fueron las siguientes:
Solved! Go to Solution.
Hola, @jmcph , la causa del problema radica en el aprovechamiento de una variable dentro de la iteración.
De hecho, variable en DAX NO siempre es variable, consulte:
https://radacad.com/caution-when-using-variables-in-dax-and-power-bi
In DAX, variables are calculated within the scope in which they are written, and then the result of them is stored and used in the rest of the expression.
Para ser más precisos con su problema, cuando AVERAGEX itera All( 'Calendar'[Date]) (siendo "1/1", "1/5", "2/5"), SumLoan se utiliza 3 veces con el mismo valor, que se calcula en iteración "1/1". Además, SumLoan se define en el ámbito más externo de la medida, sólo el contexto de filtro inicial en lugar de "1/1", como segmentación de datos, fila / columna de visualización, etc., se utiliza en el cálculo.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hola, @jmcph , la causa del problema radica en el aprovechamiento de una variable dentro de la iteración.
De hecho, variable en DAX NO siempre es variable, consulte:
https://radacad.com/caution-when-using-variables-in-dax-and-power-bi
In DAX, variables are calculated within the scope in which they are written, and then the result of them is stored and used in the rest of the expression.
Para ser más precisos con su problema, cuando AVERAGEX itera All( 'Calendar'[Date]) (siendo "1/1", "1/5", "2/5"), SumLoan se utiliza 3 veces con el mismo valor, que se calcula en iteración "1/1". Además, SumLoan se define en el ámbito más externo de la medida, sólo el contexto de filtro inicial en lugar de "1/1", como segmentación de datos, fila / columna de visualización, etc., se utiliza en el cálculo.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Proud to be a Super User!
Sí. Gracias por la entrada. Creo que voy a hacer el cálculo promedio normal primero, luego hacer otra medida filtrando las fechas para hacerlo más simple. ¡Te lo agradezco!