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
Syndicate_Admin
Administrator
Administrator

Visualización superior datos anteriores de 4 semanas

Hola a todos,

Estoy en modo de consulta directa
Tengo dos columnas Semana Fiscal y Monto y tengo que mostrar las 4 semanas anteriores(25,26,27,28) en una tabla. La columna de la semana fiscal tendrá 1-52 semanas y el monto tendrá datos solo hasta la semana 28. Probé medir como
Var _max semana = calculate(max(fiscal_week,Filter(Amount<>Blank)
Var_previousweek = _maxweek-3
devolución
Calculate(Sum(Amount), Filter(fiscal_week >=_previousweek && fiscal_week<= _maxweek))) y esto funcionó para una tarjeta y no para una tabla.

WeeksAmount

16773
27117
37112
47539
56837
66257
76398
86036
95698
106740
117097
127516
136480
145746
155355
167021
175975
187042
197344
207290
216615
227794
236363
246244
256990
267432
277029
285602
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
2 ACCEPTED SOLUTIONS
Syndicate_Admin
Administrator
Administrator

@harshagraj, un pequeño cambio, Intente

Var _max semana = maxX(filter(allselected(Table), [Amount]<>Blank), [fiscal_week])
Var_previousweek = _maxweek-3
devolución
Calculate(Sum(Amount), Filter(Table, [fiscal_week] >=_previousweek && [fiscal_week] <= _maxweek))

View solution in original post

wow funcionó como un encanto. Muchas gracias.

View solution in original post

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Hola, @harshagraj

Por favor, pruebe la siguiente medida calcualada.

Últimas cuatro semanas =
VAR maxweek =
CALCULAR (
MAX ( Datos[Semanas] ),
FILTRO ( TODOS ( Datos ), NO ISBLANK ( Datos[Importe] ) )
)
VAR lastfourweeksamount =
CALCULAR (
SUM ( Datos[Importe]),
KEEPFILTERS (
FILTRO ( TODOS ( Datos ), Datos[Semanas] >= maxweek - 3 && Data[Semanas] <= maxweek )
)
)
devolución
lastfourweeksamount

Hola, mi nombre es Jihwan Kim.

Si este post ayuda, entonces considere aceptarlo como la solución para ayudar a otros miembros a encontrarlo más rápido, y dar un gran pulgar hacia arriba.

Syndicate_Admin
Administrator
Administrator

@harshagraj, un pequeño cambio, Intente

Var _max semana = maxX(filter(allselected(Table), [Amount]<>Blank), [fiscal_week])
Var_previousweek = _maxweek-3
devolución
Calculate(Sum(Amount), Filter(Table, [fiscal_week] >=_previousweek && [fiscal_week] <= _maxweek))

Hola @amitchandak podrías ayudarme a tomar la diferencia de la semana anterior también? Quiero calcular el cambio en % con respecto a la semana anterior.

harshagraj_1-1618067140334.png

wow funcionó como un encanto. Muchas gracias.

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.