DAX - Calculating and Comparing the Difference Between Two Dates, Count Records Based on Results
I am still learning the ropes for DAX and need some help. I have used Tableau in the past and know how to do it using their calculated fields, but I can't seem to do it in Power BI.
I am trying to create a measure that does the following: DATEDIFF between two date fields in the same table, counting the number of days between them. Then, count the record if the number of days between the two dates are greater than 7.
This is how I know to do it in Tableau:
Measure 1: IF ( DATEDIFF('day', [date1], [date2] ) ) > 7 then [recordid] END
Then I could just count this measure.
This is what I have in Power BI (I know this isn't working correctly):
Open More Than 7 Days = IF(
> 7, COUNT(table_A[recordid]), 0)
Thank you for your time and any insight you can provide.