Forum Discussion

DavidH's avatar
DavidH
Helper I
6 years ago
Solved

Segregation of data based on multiple tables

I am trying to look at generating a model that displays information about who in the organisation can deliver products based on their skills.   So if you select an employee this will show all the p...
  • DavidH's avatar
    DavidH
    6 years ago

    Ok I have managed to solve this one!

     

    I created a distinct list of Product Codes and then used this for the relationship between Product and Empoyees.

    Created a measure to determine the 'score' needed 
    Product Score = CALCULATE( COUNTROWS( 'Product Codes' ) ) * 2

     

    Created a measure to calculate the employee score for each Product
    Employee Check Y/N = IF( ISFILTERED( 'Employee Authorisations'[Employees] ),
                            IF( CALCULATE( SUMX( 'Employee Authorisations', 'Employee Authorisations'[Level] ),
                            TREATAS( VALUES( 'Product Codes'[Code ID] ), 'Employee Authorisations'[Code ID] ) ) = [Product Score],
                            "Authorised", BLANK() ),
                         BLANK() )

     

    If there are any suggested alternate solutuions I would be interested to know!

    Regards,

     

    DavidH