Forum Discussion

KHOAND3's avatar
KHOAND3
New Member
4 years ago

CODE DAX

hello everyone,

I have a problem with my data. Please help me

 

MISCODEMISCODE_MANAGERNOTEKPI_PLAN
D001D001KPI5
D002D001KPI3
D003D001KPI2

 

Miscode D001 is manager of other Miscode (D002, D003). I want to build report for him (D001). 

I use Card and Matrix to visulize data. 

    Matrix: D001 view all members of team => I have done

    Card: D001 view only his KPI. But the value appears sum of all 😞 i don't know how to code measure for this situation. Please help me

 

 

Thank

1 Reply

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi KHOAND3 

    Please refer to attched sample file withthe solution. However, it was not clear to me what do you need to do incase you have multiple managers. 

    Manager KPI = 
    CALCULATE ( 
        MAX ( Data[KPI_PLAN] ),
        TREATAS ( VALUES ( Data[MISCODE_MANAGER] ), Data[MISCODE] )
    )