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

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

Reply
Anonymous
Not applicable

working out count based on date

Hi All,

 

I'm looking for a solution for this problem.

 

i have a table such as below:

 

JeffT_1-1643635003828.png

 

What i want to do is count the number of items which have moved to done in the last 30 days, based on the created datestamp.

 

I hope someone can help.

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Used this solution in the end, as it gave me what i needed.

 

Done in last 30 Days = IF(AND(AND([OLD_VALUE_FORMATTED]<> "Done", [NEW_VALUE_FORMATTED]="Done"), [CREATED].[Date]>=Today()-30),1,0)

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Used this solution in the end, as it gave me what i needed.

 

Done in last 30 Days = IF(AND(AND([OLD_VALUE_FORMATTED]<> "Done", [NEW_VALUE_FORMATTED]="Done"), [CREATED].[Date]>=Today()-30),1,0)
Anonymous
Not applicable

To solve this problem, you can use 2 approaches,

 

1. in case you want to show it in a visual, for example in a key card, you can add the count of items to the key card and add a filter on it for the date column. In the filters section, you can add the Created column to the "filters in this visual" section, click on filter type & select "relative date", select "in the last", add 30 to the textbox, select "dates" in the last column and click on apply filter. The 2nd filter you`ll apply to this visual will be for the status column, value = "done"

 

2. The second way is to create a calculated column or measure using DAX.

 

 

Please mark it as a solution if this works for you!!

 

Regards, 

SM

 

JirkaZ
Solution Specialist
Solution Specialist

That shouldn't be much of an issue imho. 

Something like this should do it:

CALCULATE(COUNTROWS(YourTable), [Old Value] <> "Done", [New Value] = "Done", DATESBETWEEN(MyDateTableDateColumn, Today() - 30, Today()))

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.