Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago

What and how to use an aggregate function?

I need to create a measure and it have to use an aggregation

8 Replies

  • Sean's avatar
    Sean
    Icon for Community Champion rankCommunity Champion

    You most likely need to add SUM to the Measure you are trying to create...

     

    But you need to explain a bit more - what are you trying to do???

    • Anonymous's avatar
      Anonymous
      Not applicable

      In my need to calculate a measured value in which I will have to use the IF function, and aggregation would be applied to the fields from other tables, for example:

       

      Measured = sum (AGGR (if (table.column = '9 - Deductions from Revenue', sum (table.Vl_Receita) + sum (table.Vl_Estorno), sum (table.Vl_Receita) - sum (table.Vl_Estorno)) [Desc Group Revenue], Nível01, year, month))

      • Sean's avatar
        Sean
        Icon for Community Champion rankCommunity Champion

        You have to explain what you are trying to do and what the data looks like.

         

        This is neither DAX nor M.