Forum Discussion

RK9009's avatar
RK9009
Frequent Visitor
5 years ago

Dax Help

Greeting PBI Community, I need help with this dax measure

studentIDstatus
abc123status 1 
abc123status 2
abc123status 3
abc123status 4
bca231status 2
bca231status 3
cab321status 2
cab231status 3
xyz234status 1 
alm222status 2
blz121status 3
cla234status 3
zla232status4
cls343status4

 

 

here’s an example: first we distinctcount all the studentIDs in Status1 - I.e 2
then we count all student IDs in Status 2 exluding the ones counted in Status1
then count all Student IDs in Status3 exlucding IDs in Status1&2
Then Count all IDs in status4 excluding IDs counted in Status 1,2,3

 

Thank you 

8 Replies

  • RK9009 

    Do you need a single measure that calculates one result or is against each Status?
    Can you share the expected output as well?

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube  LinkedIn

    • RK9009's avatar
      RK9009
      Frequent Visitor

      It's ok if we use a measure per status:
      starting with: distinct status1=calc(countdistinct(studentID),Status="status 1")

      Expected Result :
      Status1 = 2
      Status2 = 3
      Status3 = 2
      Status4 = 2