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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Emanuel
Helper I
Helper I

Porcentaje de aumento/disminución

Hola

Necesito ayuda para calcular el aumento/disminución en porcentaje de los valores en comparación con el mes anterior:

Month OnGoing

01-Jun-20499
01-Jul-20397
01-Aug-20467
01-Sep-20494

Debería mostrar algo como esto:

MesContinuaaumentar/disminuir
2020-06499
2020-07397-20%
2020-0846718%
2020-094946%

Gracias por la ayuda

1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hola @Emanuel ,

Measure = 
var lastmonth = CALCULATE(SUM('Table'[OnGoing]),DATEADD('Table'[Month],-1,MONTH))
var currmonth = CALCULATE(SUM('Table'[OnGoing]))
return
DIVIDE(currmonth-lastmonth,lastmonth)

v-xuding-msft_0-1602673052883.png

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xuding-msft
Community Support
Community Support

Hola @Emanuel ,

Measure = 
var lastmonth = CALCULATE(SUM('Table'[OnGoing]),DATEADD('Table'[Month],-1,MONTH))
var currmonth = CALCULATE(SUM('Table'[OnGoing]))
return
DIVIDE(currmonth-lastmonth,lastmonth)

v-xuding-msft_0-1602673052883.png

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@Emanuel , Puede usar la inteligencia de tiempo con la tabla de fechas

Ejemplo

Ventas MTD: CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
Last MTD Sales - CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
Ventas del último mes: CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
este mes , Ventas MTD , CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))
Last MTD (completar) Ventas : CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
valor del mes anterior: CALCULATE(sum(''Table''[valor total de horas]),previousmonth('Date'[Date]))

diff - [Ventas MTD]-[las últimas ventas MTD]
diff % á divide([MTD Sales]-[last MTD Sales],[last MTD Sales])

Para obtener lo mejor de la función de inteligencia del tiempo. Asegúrese de que tiene un calendario de fechas y que se ha marcado como la fecha en la vista de modelo. Además, únete a ella con la columna de fecha de tus hechos. Consulte :radacad sqlbi My Video Series Aprecia tus Felicitaciones.

Proporcione sus comentarios y consejos para nuevos videos
Tutorial Series Dax Vs SQL Direct Query PBI Consejos
Apreciamos tus Felicitaciones.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Top Solution Authors