Forum Discussion

DiogoValentim's avatar
DiogoValentim
New Member
9 years ago
Solved

Help creating two mesures

Hello to all,    I need a big help creating two mesures:   1st - Fees for the Shareholders : I need help creating a formula that Calculate the amont of fee one shareholder must Pay, to do so I mu...
  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi DiogoValentim,

     

    You can take a look at below formulas if it works on your side:

     

    Previsao(Data&SPE) =
    var currSPE=LASTNONBLANK(Tbl_PlanodeContas[SPE],[SPE])
    var currDate=MAX([Data])
    Return
    SUMX(FILTER(ALL(Tbl_PlanodeContas),[SPE]=currSPE&&[Data]=currDate),[Valor])

     

    Current Spend =
    var currDate=MAX([Data])
    var currSPE=LASTNONBLANK(Tbl_AporteAcionista[SPE],[SPE])
    var currAcionista=LASTNONBLANK(Tbl_AporteAcionista[nAcionista],[nAcionista])
    Return
    SUMX(FILTER(ALL(Tbl_AporteAcionista), [nAcionista]=currAcionista&&[SPE]=currSPE&&[Data]=currDate),[Aporte])

     

    Need Spend =
    CALCULATE([Previsao(Data&SPE)],VALUES(Tbl_AcionistaEmpresa[SPE]))* MAX([Participacao])

     

    Result:

     

     

    Regards,

    Xiaoxin Sheng