Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
wiselyman3
Helper II
Helper 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 NumberDate
C-1939/20/2023
C-1949/20/2023
C-1959/30/2023
C-19610/01/2023
C-19710/03/2023
1 ACCEPTED SOLUTION
ChiragGarg2512
Solution Sage
Solution Sage

@wiselyman3  Try this measure:

Num =
var _v = TODAY()-7
return
CALCULATE(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.

View solution in original post

3 REPLIES 3
Dangar332
Super User
Super User

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.
ChiragGarg2512
Solution Sage
Solution Sage

@wiselyman3  Try this measure:

Num =
var _v = TODAY()-7
return
CALCULATE(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.
wiselyman3
Helper II
Helper II

Apologies, this would be 2 complaints older than 7 days in this example. Long day!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.