Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

How to recalulate two measures

 I created a dedicated major table and divided the sales by the sales unit price, and while the results for each product are correct, the total is not displayed correctly.

So, I would like to use sum or calculate dax but they are need to table coulmun.

Coule you tell me how ot resolve it?

 

Thanks.

 

9 Replies

  • Hello Anonymous 

     

    Could you please share some snapshots of your output? While sharing the snapshots don't include sensitive data. 

     

    Thanks!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for reply.

      Attachhed the snapshot I prepared.

      Unit should be 6.51.(Total between M001 and M003).

      I calculated the unit using the formula: divide(Sales  after allcoation, Sale price from master) in measure.

      All column are caluclated by measure. I could not use sum or caclulate dax becasue this table does not contain table data.

      Do you have any good solutions?

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Attached the snapshot I prepared.

    Unit should be 6.51.(Total between M001 and M003).

    I calculated the unit using the formula: divide(Sales  after allocation, Sale price from master) in measure.

    All columns are  calculated by measure. I could not use sum or calculate Dax because this table does not contain table data.

    Do you have any good solutions?

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) My test data is the same as yours.

    Unit = DIVIDE([Sales  after allcoation],[Sale price from master])

    (2) We can create a new measure. 

    Measure = SUMX(VALUES('Table'[Material ID]),[Unit])

    (3) Then the result is as follows.

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you Neeko. 

      I wanted to use sumx  but there are no data in this table.The table is only aggregated to manage DAX formulas, and there are no columns in the table.

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous 

    suparnababu8 

    Thank you for reply.

    I tried to uplaoed the PBI file, but I could not it so I explained details.

    Unit is calculated by 

    Measure table contains only measures.

    Sales after allocation from 

    Sales price from master from

    The Sales Price Master is a master list of sales prices for each product, but since it is a table, I averaged it to use with DAX. I suspect this averaging might be the cause.

     

    I'm happy if they are helpful to you.

     

    Thanks.

     

     

     

     

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous ,

       

      What do you place on the form visual object? Is your Material ID not a column? If so, you only need to place the Material ID field and the measure Measure on the visual object.

      Measure = SUMX(VALUES('Table'[Material ID]),[Unit])

       

      Best Regards,

      Neeko Tang

      If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thank you.

        Material master ID from materia masuter table.

        Unit has not conatins a column.