Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Loop in dax

la columna donde esta el 0.78 y el 0.73 en power bi tengo esos numero como una medida y en la segunda columna tengo datos fijos hasta el 0.11, cada fila correponde a una fecha que va de enero 2023 a diciembre 2030 y el dato de la segunda columna llega hasta diciembre 2023, a aprtir de enero 2024 es todo cero hasta diciembre 2030 necesito a partir de enero 2024 que haga esa formula, en donde toma el dato fijo que tengo en el mes anterior, lo multiplicque por el que esta en rojo (0.73) y lo divida por el que esta en violeta(0.78) 
para calcular febrero tomaria lo que calculo el mes anterior multiplicando por la columna uno de ese mes y dividiendo por la misma columna pero del mes anteriior y asi sucesivamente. 
Como puedo hacer para que en una medida que me genere estos valores donde va tomando el dato anterior calculado partiendo del ultimo dato fijo ?

the column where the 0.78 and 0.73 are in power bi I have those numbers as a measure and in the second column I have fixed data up to 0.11, each row corresponds to a date that goes from January 2023 to December 2030 and the data of the second column reaches December 2023, from January 2024 it is all zero until December 2030 I need from January 2024 to make that formula, where it takes the fixed data that I have in the previous month, multiply it by the one that is in red ( 0.73) and divide it by the one in purple(0.78)
To calculate February, I would take what I calculated the previous month by multiplying by column one of that month and dividing by the same column but from the previous month and so on.
How can I do so that in a measurement that generates these values ​​where it takes the previous data calculated starting from the last fixed data?

1 Reply