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

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

Reply
Anonymous
Not applicable

Counting the Most Recent Status

The target is to count the most recent activity status by date. I currently have COUNTROWS of a table and that is correctly giving me all status categorized by dates but there is a new requirement only asking for a total count of the most recent activity status. Any suggestions on how to structure a measure that will result in a count of the most recent activity status?

 

Below is sample data: table 1 = source data / table 2 = expected output

(Table 1 = source data)

DateStore_IDActivity_Status
Wednesday, October 28, 20201New
Thursday, October 29, 20201In Progress
Friday, October 30, 20201Complete
Friday, January 29, 20212New
Monday, February 1, 20213New
Monday, February 1, 20214New
Tuesday, February 2, 20213In Progress

 

(Table 2 = expected output)

Month_YearMost_Recent_ActivityStatus_Count
October 20201
January 20211
February 20212

 

Your advice will be greatly appreciated. 

1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

please check if that helps you.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

3 REPLIES 3
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

please check if that helps you.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Anonymous
Not applicable

Thank you for your support. I was able to figure out a measure to give me the count of the most recent activity with the following: 

 

Store ID Count = COUNTROWS(DataTable)

 

Most Recent Activity Count =
CALCULATE(
[Store ID Count],
FILTER(
DataTable,
MAX(DataTable[Store_ID])
),
LASTDATE(DataTable[Date])
)

 

My problem now is that when I drop this information into a matrix table, the individual activities are still visable. Although the count is correct, is there a way for me to not have the individual activities visable? 

 

Your advice is greatly appreciated. 

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,
can you share some screenshots of the data model and matrix?

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors