Forum Discussion
MarkSmash
2 years agoFrequent Visitor
Measure for Unique Records from Previous Term
Hello, I'm looking to get a measure, "Unique Students Last Year," which would be the number of unique records from the previous term (in this case a term is a school year). The scores are based o...
- 2 years ago
Click here to download the solution
Download PBIX
How iit works ...Students this year = DISTINCTCOUNT(TestScores[Student])Students previous year = VAR thisref= SELECTEDVALUE(SchoolYear[Order]) VAR previousref= thisref - 1 RETURN CALCULATE( DISTINCTCOUNT(TestScores[Student]), ALL(SchoolYear), SchoolYear[Order] = previousref)Please click both the ACCCEPT SOLUTION button and the thumbs up buttons.
If you need more help then please raise a new ticket and quote speedramps
I will receive an automated notifcation and will try help
speedramps
Super User
2 years agoClick here to download the solution
Download PBIX
How iit works ...
Students this year =
DISTINCTCOUNT(TestScores[Student])
Students previous year =
VAR thisref= SELECTEDVALUE(SchoolYear[Order])
VAR previousref= thisref - 1
RETURN
CALCULATE(
DISTINCTCOUNT(TestScores[Student]),
ALL(SchoolYear),
SchoolYear[Order] = previousref)
Please click both the ACCCEPT SOLUTION button and the thumbs up buttons.
If you need more help then please raise a new ticket and quote speedramps
I will receive an automated notifcation and will try help
MarkSmash
2 years agoFrequent Visitor
Ahh--All(SchoolYear) was the missing piece for me. Thanks for the quick response!