Forum Discussion

marlonip's avatar
marlonip
Frequent Visitor
6 years ago
Solved

Filter a table visual based on the latest data update

Hello guys!   I have a dashboard which it's data is based on a position for open items, so every day I have a programmed routine that downloads the data into my dashboard and it get's updated. Cons...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi marlonip ,

     

    I assume that you do not use a separate table to select the dates (otherwise you need a slightly different solution).

     

    This is the sample tabel I used

     

    The slicer is based on Date1:

    As you can see, when there is no selection the latest date rows are shown.

     

    When you make a selection, it still only shows the selection.

     

     

    These are the measures I use:

    Max Date1 := max(Table1[Date1]) -- 'calculate' row level maxdate in measure

    Selected Date :=
    var maxDate = Maxx(all(Table1[Date1]),'Table1'[Date1]) -- store current value for comparison
    var selectedDATES = COUNTROWS(ALLSELECTED(Table1[Date1]))
    var allDATES = COUNTROWS(ALL(Table1[Date1]))
    return
    if ( AND(selectedDATES = allDATES, '_keyMeasures'[Max Date1] = maxDate),"Nothing Selected",IF(selectedDATES<allDATES,"Selection"))

     

    I hope you can transfer this to your own dashboard.

     

    Jan