Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

SUM using ALLSELECTED from other table

Hi all,

 

It seems to me, it would easier to do, but I'm having a hard time to sum a value in my table.
I have the following relationship between my tables:

 

I calculated the total production, and it appers ok when I check by using a dashboard filter.

 

 

 Now I want to calculate the "total family production", and show the same value for each material which belongs for this "family".

I tried to use 

 

CALCULATE(SUM(Production[Quantity]),ALL(Material_FG[Family (1)]))
 
and 
 
CALCULATE(SUM(Production[Quantity]),ALLSELECTED(Material_FG[Family (1)]))
 
but it doesn't work as expected. 
 
Is there a problem that I'm not seeing?
  • lbendlin's avatar
    lbendlin
    4 years ago

    I would combine the Unit Price and BOM tables.   Any reason not to?

     

     

6 Replies

  • Please indicate the expected outcome.  Also, read about ALLEXCEPT() - that might be more appropriate.

    • Anonymous's avatar
      Anonymous
      Not applicable

      My expected outcome is each item shows the total value of it family (repeated), as below. However, I got this value by using some filter on the table, and I would like to have this value in order to multiply for another calculation.

       

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        While I would challenge your expected outcome (the same number repeated all over usually is a UX red flag) the suggestion to use ALLEXCEPT() still stands.

         

        Please provide sanitized sample data that fully covers your issue.
        Please show the expected outcome based on the sample data you provided.