Forum Discussion

Camilo_Munoz's avatar
Camilo_Munoz
New Member
6 years ago
Solved

Filtro Lista desplegable

Hola a todos

Tengo la siguiente situación, tengo un reporte donde tengo un filtro con lista desplegable con fechas, (el reporte se ejecuta todos los días automáticamente y va guardando la historia dia a dia), sin embargo todos los días manualmente tengo que ingresar a actualizar para que en la lista desplegable quede la ultima fecha.

Existe una opción para que mostrar los datos  por fecha máxima de forma predeterminada y que el usuario si quiere pueda continuar haciendo filtro por alguna otra fecha?

Mi variable fecha se llama corte

  • It's possible, but for a cost. You must create a calculated column that converts the dates to text format and replaces the maximum date with a constant string such as "Latest". Once you set that value as a filter on your splinter, it will always be selected when updating.

    lbendlin_2-1596495169768.png

    You will also need to sort that new column by another column, ideally by a date number column that you already have in the date table.

    lbendlin_0-1596495052689.png

    lbendlin_1-1596495098255.png

  • @Camilo_Munoz ,

    You can a column like this in your chart

    Tipo de fecha: SWITCH(TRUE(),'Date'[Date]-TODAY(),"Today"
    ,'Date'[Fecha]-TODAY()-1,"Yesterday"
    ,'Date'[Fecha]&"")

    select today


    Tipo de fecha: SWITCH(TRUE(),'Date'[Date]-Max(Table[Date]),"Last Date"
    ,'Date'[Fecha]&"")

    Select The Last Date in The Slicer

    Create one more column

    Date1 - Date

    and sort the date type on date1

2 Replies

  • It's possible, but for a cost. You must create a calculated column that converts the dates to text format and replaces the maximum date with a constant string such as "Latest". Once you set that value as a filter on your splinter, it will always be selected when updating.

    lbendlin_2-1596495169768.png

    You will also need to sort that new column by another column, ideally by a date number column that you already have in the date table.

    lbendlin_0-1596495052689.png

    lbendlin_1-1596495098255.png

  • @Camilo_Munoz ,

    You can a column like this in your chart

    Tipo de fecha: SWITCH(TRUE(),'Date'[Date]-TODAY(),"Today"
    ,'Date'[Fecha]-TODAY()-1,"Yesterday"
    ,'Date'[Fecha]&"")

    select today


    Tipo de fecha: SWITCH(TRUE(),'Date'[Date]-Max(Table[Date]),"Last Date"
    ,'Date'[Fecha]&"")

    Select The Last Date in The Slicer

    Create one more column

    Date1 - Date

    and sort the date type on date1