Forum Discussion
sgodfrey
7 years agoFrequent Visitor
compare a date field to a defined date
Hi, I'm trying to count the number of rows where a certain date/time field has been met according to a statically defined date in DAX as the visual filter will not work with the particular viz I ...
- 7 years ago
Thanks, still double-checking the results and math, but its definitely evaluating both the date and the time now! :)
SteveCampbell
Memorable Member
7 years agoHello,
Usually, it is good to use DATE() and TIME() functions for comparison.
Can you try:
PWDGT06152018_Enabled =
CALCULATE (
DISTINCTCOUNT ( Table[acctname] ),
FILTER (
'Table',
'Table'[AcctType] = "Value"
&& 'Table'[EnabledDisabled] = "Enabled"
&& 'Table'[passwordChange].[Date]
>= DATE ( 2018, 06, 15 ) + TIME ( 14, 30, 0 )
)
)- sgodfrey7 years agoFrequent Visitor
Thanks, still double-checking the results and math, but its definitely evaluating both the date and the time now! :)