Forum Discussion
Filtering a visual to display data for dates prior to min date of date range filter
- 1 year ago
Hi Usefulinfo - To achieve this, you can avoid using REMOVEFILTERS by focusing on maintaining the date context from the filter visual. Instead of removing filters, we can use ALLSELECTED with a condition to include only dates earlier than the minimum selected date in the filter
ShowApplication =
VAR MinFilterDate =
CALCULATE(
MIN('Date Table'[Date]),
ALLSELECTED('Date Table')
)
RETURN
CALCULATE(
COUNTROWS('App'),
KEEPFILTERS('App'[Received_Date] < MinFilterDate)
)hope this gives you correct app count with date filter. please check
- 1 year ago
Usefulinfo since you use ReceivedDate as Key column for Calendar relationship, modify your solution to this:
CALCULATE( COUNTROWS('Sheet2'), DateTable[Date] < StartDate, -- the change is here, using Date column from calendar instead RecievedDate -- and also here, since it's different table you have to add these filter as new parameter, so split by comma ISBLANK('Sheet2'[Despatch_Date]) && 'Sheet2'[Status] <> "close" ) - 1 year ago
Yes, I have all these details. I have tested again and its working fine.
Thank you so much for your help.
vojtechsima , I have created sample file but seems like dont have permission to attcahed the pbix file.
Table visual 'Without_Keepfilter' giving correct result but received date is showing all date(not lesser date).
Table visual WithKeepfilter show blank for condition 'Sheet2'[Received_Date] < StartDate.
-------------
I couldn't keep additional condition along with the solution you have suggested.
Usefulinfo since you use ReceivedDate as Key column for Calendar relationship, modify your solution to this:
CALCULATE(
COUNTROWS('Sheet2'),
DateTable[Date] < StartDate, -- the change is here, using Date column from calendar instead RecievedDate
-- and also here, since it's different table you have to add these filter as new parameter, so split by comma
ISBLANK('Sheet2'[Despatch_Date]) &&
'Sheet2'[Status] <> "close"
)
- Usefulinfo1 year ago
Helper I
vojtechsima , Thank you so much for your suggesion.
I did same but didn't get same result. It really look weired.
I will check once again if I am missing something.
- vojtechsima1 year ago
Super User
Usefulinfo
I am sending you my file in case:
smallerThanReceivedDateMinDate.pbix
make sure you have correct relationship, datatable is setup as calendar, you have full year of the calendar and you use calendar as the Slicer, those are general rules.- Usefulinfo1 year ago
Helper I
Yes, I have all these details. I have tested again and its working fine.
Thank you so much for your help.