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.
Hola
Tengo una tabla (Clasificaciones) con múltiples valores (5 Clasificaciones por estrellas) por día y se acumulan, así:
Fecha | Día laborable | Weeknum | 5 Clasificaciones por estrellas |
28.02 | Sol | 9 | 1.000 |
28.02. | Sol | 9 | 1.100 |
01.03 | Mi | 10 | 1.150 |
01.03 | Mi | 10 | 1.160 |
02.03 | Mar | 10 | 1.200 |
03.03 | Mié | 10 | 1.300 |
03.03 | Mié | 10 | 1.356 |
... | |||
07.03 | Sol | 10 | 1.500 |
OBJETIVO: Quiero una medida que me muestre por semana el último valor de la semana anterior. Así que puedo calcular promedios, etc. con diferencias, etc.
Así que como:
Actual | Anterior | |
Semana 9 | 1.100 | ... |
Wek 10 | 1.500 | 1.100 |
La semana actual es fácil con SUM y MAX Date.
Para la semana anterior lo intenté así:
Prev.Week =
No me muestra nada.
Thx para tu ayuda.
Micha
Solved! Go to Solution.
Puede probar la siguiente fórmula:
Prev.Week =
CALCULATE(SUM(Ratings[5Star]),FILTER(ALL(Ratings),Ratings[Weeknum]=(MAX(Ratings[Weeknum])-1) && Ratings[Date]=(Ratings[Date]+ 7-WEEKDAY(Ratings[Date],2)) ) )
Puede probar la siguiente fórmula:
Prev.Week =
CALCULATE(SUM(Ratings[5Star]),FILTER(ALL(Ratings),Ratings[Weeknum]=(MAX(Ratings[Weeknum])-1) && Ratings[Date]=(Ratings[Date]+ 7-WEEKDAY(Ratings[Date],2)) ) )
@blamic , Comprobar mi blog WOW, puede ayudar, utilizando rango y semana / fecha tabla
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
@amitchandak thx. Weekrank ayudó mucho thx.
Tengo la suma de la semana anterior hasta ahora:
Si quieres el valor del último día de la semana anterior intenta añadirlo a tu fórmula:
&& Ratings[Date]=(Ratings[Date]+ 7-WEEKDAY(Ratings[Date],2))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.