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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calcular diferencia de valores de la semana actual

Hola,

 

me gustaría calcular mediante fórmula, la diferencia en "Calls..." ya sea en valores o en %, de la ultima semana - la anterior, según categoría.

 

Por ejemplo con esta última semana (53_20)-(52_20).

NOTA: Tengo un índice que ordena esas semanas de manera cronológica.

 

dmorala2_0-1609844739372.png

 

Gracias de antemano.

 

2 ACCEPTED SOLUTIONS
V-lianl-msft
Community Support
Community Support

No @dmorala2,

Desafortunadamente, la imagen es demasiado vaga para proporcionar información válida.

En función de su descripción, he creado un archivo de prueba para su referencia. La medida es la siguiente:

Measure = 
var this_index = MAX('Table'[Index])
var last_week = CALCULATE(
    SUM('Table'[value]),
    FILTER(ALLEXCEPT('Table','Table'[category]),'Table'[Index]=this_index-1))
var this_week = SUM('Table'[value])
return this_week-last_week

V-lianl-msft_0-1610005996203.png

Ejemplo .pbix

Saludos
Liang
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

View solution in original post

Anonymous
Not applicable

Gracias a los 2,

pero solucionado!

LastW á CALCULATE(sum('WEEK Skyline'[Calls SK]), FILTER(ALLSELECTED('WEEK Skyline'), 'WEEK Skyline'[INDICE]-max('WEEK Skyline'[INDICE])-1))
ThisW ? CALCULATE(sum('WEEK Skyline'[Calls SK]), FILTER(ALLSELECTED('WEEK Skyline'), 'WEEK Skyline'[INDICE]-max('WEEK Skyline'[INDICE])))
ThisVSLast á [ThisW] - [LastW]

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Gracias a los 2,

pero solucionado!

LastW á CALCULATE(sum('WEEK Skyline'[Calls SK]), FILTER(ALLSELECTED('WEEK Skyline'), 'WEEK Skyline'[INDICE]-max('WEEK Skyline'[INDICE])-1))
ThisW ? CALCULATE(sum('WEEK Skyline'[Calls SK]), FILTER(ALLSELECTED('WEEK Skyline'), 'WEEK Skyline'[INDICE]-max('WEEK Skyline'[INDICE])))
ThisVSLast á [ThisW] - [LastW]
V-lianl-msft
Community Support
Community Support

No @dmorala2,

Desafortunadamente, la imagen es demasiado vaga para proporcionar información válida.

En función de su descripción, he creado un archivo de prueba para su referencia. La medida es la siguiente:

Measure = 
var this_index = MAX('Table'[Index])
var last_week = CALCULATE(
    SUM('Table'[value]),
    FILTER(ALLEXCEPT('Table','Table'[category]),'Table'[Index]=this_index-1))
var this_week = SUM('Table'[value])
return this_week-last_week

V-lianl-msft_0-1610005996203.png

Ejemplo .pbix

Saludos
Liang
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

amitchandak
Super User
Super User

@dmorala2 , En caso de que necesite medida, Cree una tabla de fecha o semana (separada) con el rango de la semana y use eso

nueva columna

Rango de la semana - RANKX(all('Date'),'Date'[Year Week],,ASC,Dense)

Medida
Esta semana: CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]-max('Date'[Week Rank])
Last Week ? CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]-max('Date'[Week Rank])-1))

Power BI — Semana a semana y WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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