Forum Discussion
Filter a table visual based on the latest data update
- Anonymous6 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
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
- marlonip6 years agoFrequent Visitor
Hi Anonymous, I'm sorry for taking so long to reply!
Thank you very much for your help! I was able to, with a few adjustments to my model and measures, to apply your solution to my dashboard. Now everything works fine.
Once again, thanks!