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
DCKarol1999
Frequent Visitor

Mostrar las Ventas de los últimos 5 días

Buenas tardes su apoyo:

Quisiera mostrar un grafico de lineas de las ventas de los ultimos 5 dias en base al filtro periodo.

Por ejemplo filtro la fecha de hoy 10/12/2021 (L-V) -> entonces me debe de mostrar 10, 09 ,08, 07 y 06 de Diciembre 

si filtro 04/12/2021 (S) -> entonces me mostrara los dias 04 dic, 27 nov , 20 nov, 13 nov, 06 nov 

si filtro 05/12/2021 (D) -> entonces me mostrara los dias 05 dic, 28 nov , 21 nov, 14 nov, 07 nov 

 

DCKarol1999_0-1639176233667.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@DCKarol1999 , You need an independent date table in slicer 

 

Independent Date Table -
Date 1 you need a independent date table , date is joined date table

measure2 =
var _max = Maxx(allselected(Date1,Date1[Date]))
var _min = Maxx(allselected(Date1,Date1[Date])) -5
return
calculate(sum('Table'[Sales]), filter('Date','Date'[Date]>=_min && 'Date'[Date]<=_max))

 

 

refer

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@DCKarol1999 , You need an independent date table in slicer 

 

Independent Date Table -
Date 1 you need a independent date table , date is joined date table

measure2 =
var _max = Maxx(allselected(Date1,Date1[Date]))
var _min = Maxx(allselected(Date1,Date1[Date])) -5
return
calculate(sum('Table'[Sales]), filter('Date','Date'[Date]>=_min && 'Date'[Date]<=_max))

 

 

refer

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

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.