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
Fr4ncoFerr3r
Helper I
Helper I

Como aplicar un filtro de ultima fecha para cada vez que abro el tablero.

Comunidad.

 

Estoy tratando de poner en producción tablero. Pero los usuarios me solicitaron si es posible establecer un filtro predeterminado, que al abrir el tablero siempre me muestres los valores para la ultima fecha cargada. Ya que es un tablero que tine varias recarga al día y muchos de los KPIs que ven los usuarios tienen medidas de valor ultima hora.

 

Necsito ayuda, no se si es posbile hacerlo.

 

Saludos!!!

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Fr4ncoFerr3r ,

 

Power BI doesn't support us to set default filter in filter option or slicer. Here I suggest you to create an unrelated table to build a slicer and then create a measure to filter your visual.

Calendar = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

Measure:

Filter Measure =
VAR _MIN =
    MIN ( 'Calendar'[Date] )
VAR _MAX =
    MAX ( 'Calendar'[Date] )
RETURN
    IF (
        ISFILTERED ( 'Calendar'[Date] ),
        IF ( MAX ( 'Table'[Date] ) >= _MIN && MAX ( 'Table'[Date] ) <= _MAX, 1, 0 ),
        IF ( MAX ( 'Table'[Date] ) = TODAY (), 1, 0 )
    )

Result is as below.

By default, visual will only show data in today.

1.png

If we do some filter in slicer, visual will show data by filter.

2.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @Fr4ncoFerr3r ,

 

Power BI doesn't support us to set default filter in filter option or slicer. Here I suggest you to create an unrelated table to build a slicer and then create a measure to filter your visual.

Calendar = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

Measure:

Filter Measure =
VAR _MIN =
    MIN ( 'Calendar'[Date] )
VAR _MAX =
    MAX ( 'Calendar'[Date] )
RETURN
    IF (
        ISFILTERED ( 'Calendar'[Date] ),
        IF ( MAX ( 'Table'[Date] ) >= _MIN && MAX ( 'Table'[Date] ) <= _MAX, 1, 0 ),
        IF ( MAX ( 'Table'[Date] ) = TODAY (), 1, 0 )
    )

Result is as below.

By default, visual will only show data in today.

1.png

If we do some filter in slicer, visual will show data by filter.

2.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Fr4ncoFerr3r , You have to create a column like this in your date table

 

Date Type = SWITCH(TRUE(),'Date'[Date]=max(fact[date]),"Max Date"
,'Date'[Date]&"")

 

And save it on max date

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.