Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Issue with sumx

Hello all,    I've tried to put this in many ways by my own, but i'm still struggling to solve this problem. Sorry by advance if it seems like a beginer question. I hope somebody knows the answer h...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Thanks  lot for your help,

    I found the solution it's : 

     

    Rouge2 =
    SUMX (
    DISTINCT('Lot 2'[Competence]),
    CALCULATE (
    VAR CC =
    SUMX('Lot 2','Lot 2'[XP]-'Lot 2'[Prérequis])
    VAR AA =
    IF ( CC <0,0,QUOTIENT(CC, 12) + 1)
    VAR BB =
    IF ( AA >= 5,5*SUMx ('Lot 2','Lot 2'[Weight]), AA * SUMX ( 'Lot 2','Lot 2'[Weight]) )
    RETURN
    BB,
    Codelot2[Couleur]= "R"
    )
    )