Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hola expertos,
Necesito calcular las ventas del mismo período del último año en una medida calculada.
Aquí, el período 1 = 4 semanas y, por lo tanto, hay 13 períodos en un año.
Aquí está la tabla donde se dan el formato de período y las ventas. La columna 3 (Medida requerida) debe calcularse:
Periodo | Ventas | Medida requerida |
2021P01 | 100 | |
2021P02 | 200 | |
2021P03 | 300 | |
2021P04 | 400 | |
2021P05 | 500 | |
2022P01 | 600 | 100 |
2022P02 | 700 | 200 |
2022P03 | 800 | 300 |
2022P04 | 900 | 400 |
2022P05 | 1000 | 500 |
¡Gracias de antemano!
Hola
En la atenuación Fecha, agregue la siguiente columna:
Hola @MahyarTF ,
Creado calculado como sugirió y asignado a la tabla principal, pero no funcionó. Los valores solo se devolvieron durante el último período y eso también fueron valores bastante extraños.
Hola
1- crear Dim Date con el siguiente script:
3- En la tabla principal, cree Medida para calcular el monto de ventas del último año:
@atult si puede tener una columna de año por separado,
entonces puedes usar este dax para obtener ventas py.
Acepte la solución si funciona para usted.
Hola @Mohan1029 ,
No funcionó para mí. ¿Está creando una columna o medida calculada para esto?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.