Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Syndicate_Admin
Administrator
Administrator

Cálculo dinámico de la medida del trimestre del año actual y anterior con una cortadora separada para el mes y el año

Hola a todos,

Soy muy nuevo en Power BI, apreciamos si me pudiera ayudar a encontrar la solución. Mi escenario es que necesito calcular la suma total de una medida para el trimestre del año actual y anterior, por favor vea el recorte a continuación, pero el problema es que hay dos rebanadoras separadas, una para el MES FISCAL y otra para el AÑO. Por lo tanto, el requisito es que cuando un usuario selecciona cualquier mes y año en la segmentación de datos, la suma total sería la suma del trimestre al que cae el mes.

rahulrackup_0-1634535693743.png

Por ejemplo, si selct Month( July), Year 2022, debería obtener valores para el primer trimestre (es decir, julio, agosto, septiembre) de 2022 y 2021 bajo el nombre de columna QTD y QTD PY. a continuación se muestra la fórmula que he utilizado.

QTD- CALCULATE ( SUMA ( Datos [Valor] ), PARALLELPERIOD ( 'Calendario' [Fecha del año fiscal], 0, TRIMESTRE ) )

QTD PY- CALCULATE ( SUMA ( Datos [Valor] ), PARALLELPERIOD ( 'Calendario' [Fecha del año fiscal], -1, TRIMESTRE ) )

Pero los números no están llegando para QTD-PY. Por favor, ayuda a arreglar esto

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@rahulrackup, Espero que tengas tabla de fechas, con inteligencia de tiempo

Qtr Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(ENDOFQUARTER('Date'[Date])))

Ventas del último trimestre = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD( ENDOFQUARTER(dateadd('Date'[Date],-1,QUARTER))))
Ventas del último trimestre = CALCULATE(SUM(Sales[Sales Amount]),PREVIOUSQUARTER(('Date'[Date])))

Power BI: Qtr en Qtr con o sin inteligencia de tiempo
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
https://www.youtube.com/watch?v=8-TlVx7P0A0

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hola Amit,

Gracias por su respuesta, pero para el trimestre del año anterior no está funcionando. por favor vea a continuación el recorte.

rahulrackup_0-1634566326386.png

Por ejemplo, si selecciono el año 2022 y el mes jul, debería poder ver el trimestre del año actual y anterior, es decir, (julio, agosto y septiembre) el valor del trimestre para 2022 y 2021.below la fórmula no funciona para QTD PY

QTD PY- CALCULATE ( SUMA ( Datos [Cantidad] ), PARALELOPERIOD ( 'Calendario'[Fecha], -1, TRIMESTRE ) )

Syndicate_Admin
Administrator
Administrator

@rahulrackup, Espero que tengas tabla de fechas, con inteligencia de tiempo

Qtr Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(ENDOFQUARTER('Date'[Date])))

Ventas del último trimestre = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD( ENDOFQUARTER(dateadd('Date'[Date],-1,QUARTER))))
Ventas del último trimestre = CALCULATE(SUM(Sales[Sales Amount]),PREVIOUSQUARTER(('Date'[Date])))

Power BI: Qtr en Qtr con o sin inteligencia de tiempo
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
https://www.youtube.com/watch?v=8-TlVx7P0A0

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors