Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hola, espero que alguien pueda ayudarme, necesito comparar la variacion de ventas entre dos periodos, pero estos periodos no son consecutivos.
En ROJO la variacion que me deberia salir, pero no consigo dar con la formula adecuada. Muchas gracias!
FY_Tertial | Start_Tertial_Date | VENTAS | VARIACION |
20211 | 9/1/2020 | 5,732,369 | |
20212 | 1/1/2021 | 7,605,331 | 32.7% |
20213 | 5/1/2021 | 8,368,261 | 10.0% |
20221 | 9/1/2021 | 9,033,173 | 7.9% |
20222 | 1/1/2022 | 8,480,562 | -6.1% |
20223 | 5/1/2022 | 8,138,353 | -4.0% |
20231 | 9/1/2022 | 4,204,960 | -48.3% |
Solved! Go to Solution.
Prueba con esta medida (en mi ejemplo, la tabla de se llama 'fTable')
% Variación =
VAR _PrevDate =
CALCULATE (
MAX ( fTable[Start_Tertial_Date] ),
FILTER (
ALL ( fTable ),
fTable[Start_Tertial_Date] < MAX ( fTable[Start_Tertial_Date] )
)
)
VAR _PrevVentas =
CALCULATE (
SUM ( fTable[VENTAS] ),
FILTER ( ALL ( fTable ), fTable[Start_Tertial_Date] = _PrevDate )
)
RETURN
DIVIDE ( SUM ( fTable[VENTAS] ) - _PrevVentas, _PrevVentas )
Proud to be a Super User!
Paul on Linkedin.
Prueba con esta medida (en mi ejemplo, la tabla de se llama 'fTable')
% Variación =
VAR _PrevDate =
CALCULATE (
MAX ( fTable[Start_Tertial_Date] ),
FILTER (
ALL ( fTable ),
fTable[Start_Tertial_Date] < MAX ( fTable[Start_Tertial_Date] )
)
)
VAR _PrevVentas =
CALCULATE (
SUM ( fTable[VENTAS] ),
FILTER ( ALL ( fTable ), fTable[Start_Tertial_Date] = _PrevDate )
)
RETURN
DIVIDE ( SUM ( fTable[VENTAS] ) - _PrevVentas, _PrevVentas )
Proud to be a Super User!
Paul on Linkedin.
Muchisimas gracias! ha funcionado perfectamente 😀