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
Ricardo0717
Regular Visitor

Ayuda Cálculo Tasa Crecimiento

Buenas Tardes

 

Cordial Saludo

 

Me gustaría calcular el crecimiento que se viene teniendo año a año en los profesores que pertenecen a cierta categoría, pero tengo los datos como se puede apreciar en la siguiente imagen:

 

Ricardo0717_0-1600812316343.png

 

Como pueden ver en la imagen, en la base de datos, en la columna Categoría Escalafón se encuentran todas las categorías que los profesores van teniendo año a año, por tanto, para observar cuantos profesores hay en cada categoría se realizó el recuento, pero yo quisiera mostrar también en la tabla el crecimiento año a año, por ejemplo para la Categoría "A" en 2016 se tuvo a 9 profesores y en 2017 se aumentó a 38, quisiera agregar una columna al lado, que me muestre en porcentaje cuál es el crecimiento entre periodos, pero no sé cómo realizar dicha labor, les agredecería mucho si me pueden dar luces de cómo ejecutarlo.

1 REPLY 1
amitchandak
Super User
Super User

@Ricardo0717 , Example based on what I got

 

with different year/date table

 

This Year = CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))

diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])

 

if you have date then with date table

This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))

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