Forum Discussion
pmcinnis
Helper III
6 years agoHow do I filter rows by date range in DAX?
What do I need to add to the DAX scripts below to include only rows with dates that fall in the period January 1, 2013 to December 31, 2018? For the first two scripts, there is only one table. I...
sturlaws
Resident Rockstar
6 years agoHi pmcinnis ,
try this:
res ct dist =
CALCULATE (
COUNTROWS ( 'Data' ),
FILTER (
ALLEXCEPT ( 'Data', 'Data'[Parameter] ),
[Sample Type] = "DISTRIBUTION"
&& Data[Date] >= DATE ( 2018, 1, 1 )
&& Data[Date] <= DATE ( 2018, 12, 31 )
)
)
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.