Distinct count ID by the last date change into the last school they got enrolled

Hello,

I have a table that has ID, Application Status, University Name, Date updates, Current Grade. I am trying to do a distinct count of IDs that have been accepted at the latest date into the latest University. A person can get accepted into more than one university.

I have my current calculation as,

** CALCULATE (

DISTINCTCOUNT ( ‘Table’[ID] ),

GENERATE (

VALUES ( ‘Table’[ID] ),

LASTNONBLANK ( ‘Table’[Date], 0 )

),

’Table’[Application_Status] = "Accepted"

)**

I am going to be showing the visual on a Matrix table with University names being on the rows, grade being on the column and the measure on the values. However, I am having trouble trying to get the latest university as the count in the calculation. Like the student is getting counted twice if he/she is accepted in two universities. Could you tell me what I might be doing incorrectly here?

Hi @supergallagher25

It will be helpful if you could share the sample pbix file also.

Also, when posting a DAX code fragment, please format it with the </> button.
Greg
_eDNA Forum - Format DAX

Hi @supergallagher25, we aim to consistently improve the topics being posted on the forum to help you in getting a strong solution faster. While waiting for a response, here are some tips so you can get the most out of the forum and other Enterprise DNA resources.

  • Use the forum search to discover if your query has been asked before by another member.
  • When posting a topic with formula make sure that it is correctly formatted to preformated text </>.
  • Use the proper category that best describes your topic
  • Provide as much context to a question as possible.
  • Include demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

I also suggest that you check the forum guideline How To Use The Enterprise DNA Support Forum. Not adhering to it may sometimes cause delay in getting an answer.

My apologies, I figured it out right after I posted the question.