Forum Discussion
wiselyman3
2 years agoHelper II
Count Rows older than 7 days
Hi All,
I am trying to create a visual that shows the number of complaints (rows) that are older than 7 days. Each row has a date in the "Date" column, and this column is formatted as a date. I believe I need to create a measure to put into the visual, but I have not been successful. Below is a sample of the data. So with this example, I would want it to count 3 complaints that are older than 7 days old. Thanks!
Table1
| Complaint Number | Date |
| C-193 | 9/20/2023 |
| C-194 | 9/20/2023 |
| C-195 | 9/30/2023 |
| C-196 | 10/01/2023 |
| C-197 | 10/03/2023 |
wiselyman3 Try this measure:
Num =var _v = TODAY()-7returnCALCULATE(COUNT(q5[Complaint Number]), FILTER(q5, q5[Date]<= _v))P.S. q5 is the name of the table.Thank You, accept as solution if this helps.
3 Replies
- ChiragGarg2512Solution Sage
wiselyman3 Try this measure:
Num =var _v = TODAY()-7returnCALCULATE(COUNT(q5[Complaint Number]), FILTER(q5, q5[Date]<= _v))P.S. q5 is the name of the table.Thank You, accept as solution if this helps. - wiselyman3Helper II
Apologies, this would be 2 complaints older than 7 days in this example. Long day!
- Dangar332Resident Rockstar
hi, wiselyman3
try below measure
COUNTROWS(FILTER(da,CONVERT(TODAY()-'da'[Date],INTEGER)>7))If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.