Please see my sample pbix: https://www.dropbox.com/s/cgi72ptrirubkvk/Default%20table%20to%20latest%20items.pbix?dl=0
I have a simple [Reservations] table, containing items reserved on a given Reserve Date. My report needs to:
- Offer a bar chart showing the number of items on reserve over time - DONE
- Offer a Card showing the number of items on Reserve, defaulting to the current date (max date in the table) or if a date is selected from the bar chart, to show the number on that day - DONE
- A table listing the items on order, defaulting to the current day or showing the items on order if another date is selected from the bar chart - NOT DONE.
I have created the following measure:
# Items On Reserve = VAR __maxDate = MAX ( Reservations[Reserve Date] ) RETURN CALCULATE ( COUNTROWS ( Reservations ), Reservations[Reserve Date] = __maxDate )
Which allows my card to default to the number of items on reserve today - eg 01/09/2019 it reports 4 items and if I select a date fro the bar chart, my card reports the correct number of items for that day.
The table also reflects shows these items.
However if I don’t select a date from the bar chart, my table shows all items in the table. Is there a way to default the table to show the items for today (4 rows) if the user does nothing and to still show the items relating to a historical date if the user selects a date from the bar chart? I was hoping that he presence of the measure in the table would do this, but alas not