Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hola equipo,
Intenté obtener el valor de fila anterior de la columna "P" basado en la columna "Año" con debajo de DAX para agregar NUEVA columna "Previous_P",
ID de grupo estadístico | Año | P |
112042 | 2021 | 0 |
112042 | 2022 | 0 |
112042 | 2023 | 0 |
112042 | 2024 | 164.74 |
112042 | 2025 | 159.8 |
112042 | 2026 | 155.01 |
112042 | 2027 | 150.36 |
112042 | 2028 | 145.85 |
137165 | 2021 | 0 |
137165 | 2022 | 0 |
137165 | 2023 | 0 |
137165 | 2024 | 0 |
137165 | 2025 | 8525.5 |
137165 | 2026 | 8270.5 |
137165 | 2027 | 8024 |
137165 | 2028 | 7862.5 |
Previous_P = SUMX(FILTER(Sheet1,Sheet1[Year]=EARLIER(Sheet1[Year])-1),Sheet1[P])
después de aplicar por encima de DAX, pude obtener el siguiente resultado:
pero lo que quiero es obtener "previous_P" con grupo de diferente valor de "Statistic Group ID".
Intenté usar DAX como se muestra a continuación, pero no pude obtener los datos esperados:
Previous_P =
CALCULATE(
SUMX('Sheet1',Sheet1[P]),
FILTER(Sheet1,Sheet1[Year]=(Sheet1[Year])-1),ALLEXCEPT(Sheet1,Sheet1[Statistic Group ID])
)
¿Podría apoyar para proponer cómo puedo obtener los datos esperados?
¡Gracias!
Solved! Go to Solution.
@alson2002 , Prueba como
Previous_P = SUMX(FILTER(Sheet1,Sheet1[Year]=EARLIER(Sheet1[Year])-1 && Sheet1[Statistic Group ID] = earlier(Sheet1[Statistic Group ID] ) ),Sheet1[P])
@alson2002 , Prueba como
Previous_P = SUMX(FILTER(Sheet1,Sheet1[Year]=EARLIER(Sheet1[Year])-1 && Sheet1[Statistic Group ID] = earlier(Sheet1[Statistic Group ID] ) ),Sheet1[P])
Genial, gracias!!!
Check out the May 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.