Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Aggregation issue

I have an issue with the following table I created in Power BI.
Why is the sum of Outer Square only calculated per Variant Code and not among all entries?

 

  • Anonymous's avatar
    Anonymous
    7 years ago

    Ok, this simple measure did work:

     

    AQMtotal = 'Production Order'[Quantity]*RELATED('Production BOM Header'[Outer Square])

     

5 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      I didn't work with measures yet. In this case it's just two tables connected through a third table:

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi Anonymous

    If only the total sum is incorrect, other values in the [Outer Square] column is right, you could write a measure for a temparay solution.

    Measure = IF(HASONEVALUE('value'[entry no]),MAX([outer square]),SUMX(ALL('value'),[outer square]))

    To find why cause this problem, please provide detailed information, so i can reproduce your problem.

    which table do the columns [entry no], [variant code], [outer square] from?

    which are the key columns(create relationship based on) among three tables?

     

    Best Regards

    maggie

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      I didn't get it with a measure - but I can provide my pbix:

      https://1drv.ms/u/s!Ai9Gkt_8r-5VlA4MEhngEGiiacPu

       

      The issue is about the table on the bottom right side. 
      I added the quantity, so I don't have to many entries per variant code. 

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Ok, this simple measure did work:

         

        AQMtotal = 'Production Order'[Quantity]*RELATED('Production BOM Header'[Outer Square])