Forum Discussion
Anonymous
4 years agoNot applicable
Need help reset count
Hi All, I've tried to calculate the total infected and recovered users every month, the total recovered doesn't matter but the total infected when the same users are infected again after recovery th...
- 4 years ago
I'd recommend looking at whatever the last status was.
Try something like this:
CountInfected = VAR LastStatusDates = ADDCOLUMNS ( VALUES ( Summary[User] ), "@LastStatusDate", CALCULATE ( MAX ( Summary[Date] ) ) ) RETURN SUMX ( LastStatusDates, LOOKUPVALUE ( Summary[Infected], Summary[User], Summary[User], Summary[Date], [@LastStatusDate] ) )
parry2k
Super User
4 years agoAnonymous based on the data seems like everyone is recovered, how you expected answer to be 1
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
AlexisOlson
Super User
4 years agoA is reinfected in the last row.