Forum Discussion

DavidH's avatar
DavidH
Icon for Helper I rankHelper I
7 years ago
Solved

How to extract results based on selection

Greetings!   As see form the numerous posts there is a mixture of 'neewbies' and experienced datanauts here so I thought I would post something that I am struggling to get to grips with!   I have...
  • v-lili6-msft's avatar
    v-lili6-msft
    7 years ago

    hi, DavidH 

    I suggest you try this data model:

    1. Create a Employee Name fact table then create a relationship with Employees table

    2. Use this formula to create a measure

    Measure = var Scoreneeded=CALCULATE(MAXX('Employee Name',CALCULATE(SUM(Employee[Level]))),ALLSELECTED('Employee Name')) return
    IF(Scoreneeded=CALCULATE(MAXX('Employee Name',CALCULATE(SUM(Employee[Level])))), "Authorised" , "Not Authorised")

    Result:

    here is sample pbix file, please try it.

     

    Best Regards,
    Lin