Forum Discussion
Anonymous
4 years agoNot applicable
Filter a table by date using DAX - again
Greetings all, Sorry for being stupid, I'm still very new to DAX. Back in 2019 in this community, a question was asked about filtering dates. I think I'm trying to do the same thing, but I'm fail...
- 4 years ago
Anonymous the above code is for table not meaure
so either create a table
to create a measure like
countorws(CALCULATETABLE(
'date table',
DATESBETWEEN ( 'date table'[date], DATE(2021,12,26), TODAY())
))
johnt75
4 years agoSuper User
Add a new column to your date table like
Today or Before = 'Date'[Date] <= TODAY()
then add 2 filters onto the necessary visuals. Firstly, add the date field as a filter and choose Advanced Filtering -> is on or after and put in December 26, 2021.
Secondly, add the new column you created as a filter and only show values where Today or Before is true.