Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi,
I'm trying to achieve the following table representation:
For each Activity, count the number of IDs that are doing it in their most recent DateID.
Important: there are duplicates, so keep only the alphabetical MAX.
Expected:
FactActivity table:
My data model is:
My current calculation is wrong because it is affected by the row context. (the total count should be 4)
Count Most Recent Activity =
VAR LatestDate= CALCULATE( MAX(FactActivity[DateID]), ALLEXCEPT(FactActivity, FactActivity[ID]) )
RETURN
COUNTX(FactActivity, CALCULATE(MAX(FactActivity[Activity]), FactActivity[DateID]=LatestDate))
Solved! Go to Solution.
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |