Forum Discussion
Haripoola
4 years agoFrequent Visitor
Count values over a period
Hi team, I have a fact table which contains Student's details like below (attached sample copy), I'm trying to create a DAX expression that will enable me to return data when a student failed/pass...
amitchandak
Super User
4 years agoHaripoola , Refer
meausre =
var _max = maxx(filter(allselected(Table), Table[StudentID] = max(Table[StudentID])), Table[StudentUpdatedon])
return
calculate(count(Table[StudentID]), filter(Table, Table[StudentUpdatedon] =_max))
or
Measure =
VAR __id = MAX ('Table'[StudentID] )
VAR __date = CALCULATE ( MAX('Table'[StudentUpdatedon] ), ALLSELECTED ('Table' ), 'Table'[StudentID] = __id )
CALCULATE (count(Table[StudentID]), VALUES ('Table'[StudentID] ),'Table'[StudentID] = __id,'Table'[StudentUpdatedon] = __date )
Haripoola
4 years agoFrequent Visitor
Thank you for your solution and I think it works for my requirement.
Could you please suggest me how to calculate with combination of StudentID and StudentName.