Forum Discussion

nonick542's avatar
nonick542
Regular Visitor
10 years ago
Solved

CALCULATE not showing correct count

preciso de uma ajuda no power BI em uma soma condicional.   tenho 01 tabela (gigante) com datas de voos x nome.   Já fiz a soma (qt) de voos por ano, e tenho uma franquia anual.   Agora preciso...
  • nonick542's avatar
    nonick542
    10 years ago

    hi there


    I reached the solution (not the more elegant, but...)

     

    4ano = IF(SUM('f_tabelão'[PAX 4])>(CALCULATE(('d_AuxQtMáxPAX'[Qt Máx PAX contrato]);'f_tp Contrato FPSO'[Tp Contrato (anos)]=4));CALCULATE(((SUM('f_tabelão'[PAX 4])-('d_AuxQtMáxPAX'[Qt Máx PAX contrato]))*'d_custos vôos extras'[PAX Extra (só convert R$)]);'f_tp Contrato FPSO'[Tp Contrato (anos)]=4);0)

     

    f_tabelão'[PAX 4] -> Unfortunately, I needed to create different columns for each year...