The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have a table called Event Log that tracks log ins by email address. I want to count the distinct email addresses [email] in this log for the last day, week, month, & quarter in [Timestamp]. I wanted to create a measure for each time period.
Solved! Go to Solution.
@Anonymous , Try like
Email count last 24 hours = CALCULATE(DISTINCTCOUNT('Event Log'[Email]), 'Event Log'[Timestamp] >= now() -1 && 'Event Log'[Timestamp] <= now() )
or
Email count last 24 hours = CALCULATE(DISTINCTCOUNT('Event Log'[Email]), 'Event Log'[Timestamp] >= now() -time(23,59,59) && 'Event Log'[Timestamp] <= now() )
@Anonymous , Try like
Email count last 24 hours = CALCULATE(DISTINCTCOUNT('Event Log'[Email]), 'Event Log'[Timestamp] >= now() -1 && 'Event Log'[Timestamp] <= now() )
or
Email count last 24 hours = CALCULATE(DISTINCTCOUNT('Event Log'[Email]), 'Event Log'[Timestamp] >= now() -time(23,59,59) && 'Event Log'[Timestamp] <= now() )