cancel
Showing results for
Did you mean:
FRG Member

## Total with many condition

Hi,

Here's my table: How can I calculate the volume of a RUN (or many RUN) by choosing a length who was produce in this (or these) RUN?

e.g. length 8. Only in the RUN M241 for a total volume of 4,3.

e.g. lengtt 11,5. In Run M241 and M242 for a total volume of 12,3.

How can I calculate the volume of a RUN (or many RUN) by choosing a User_ID who works in this (or these) RUN?

e.g. User_ID 6 works in RUN M241 and M242 = 12,3.

e.g. User_ID 11 works in RUN M242 = 8.

*This measure works: CALCULATE(SUMX(table;table[VOLUME]);all(table[LENGTH))

How can I calculate the volume of a RUN (or many RUN) by choosing a User_ID who works and a length who was produce in this (or these) RUN?
e.g. length 11,5 and User_ID 6 =  Volume of 2,3.

e.g. length 8 and User_ID 4 =  Volume of 5,7.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
FRG Member

## Re: Total with many condition

I succeeded to have the expecting result. In another table I have the Run so I made this measure and it works:

CALCULATE(CALCULATE(SUMX(table;table[Volume]);ALL(table[Length]);RELATEDTABLE(RUN))

5 REPLIES 5
lc_finance Senior Member

## Re: Total with many condition

Hi @FRG ,

Based on your description, I think Power BI slicer should do the job and we don't need to add specific formulas.

Below is a screenshot based on your third example: LC

Interested in Power BI and DAX tutorials? Check out my blog at www.finance-bi.com

FRG Member

## Re: Total with many condition

Thanks @lc_finance ,

But the expected result with these slicer should be the total of volume of all the RUN where the length 11,5 was produce. Same things for User_ID. In that case the total volume is for RUN M241 is 4,3 and for RUN M242 it's 8.

lc_finance Senior Member

## Re: Total with many condition

Hi @FRG

thank you, I understand better the question now.

You can do that using ALL. You can download my updated solution from here.

You can add a measure with the following formula:

``Unfiltered volume = CALCULATE(SUM('Run Table'[VOLUME]), ALLEXCEPT('Run Table','Run Table'[RUN]))``

This is a screenshot of the solution: Let me know if this is what you are looking for.

LC

Interested in Power BI and DAX tutorials? Check out my blog at www.finance-bi.com

FRG Member

## Re: Total with many condition

Hi,

This is a screen shot of expected result when filtered bu User_ID and Length. This is the complexity. I'm looking for a measure who gives expecting result with many different filter.

Thanks

FRG Member

## Re: Total with many condition

I succeeded to have the expecting result. In another table I have the Run so I made this measure and it works:

CALCULATE(CALCULATE(SUMX(table;table[Volume]);ALL(table[Length]);RELATEDTABLE(RUN))

Announcements #### New Topics Started Badges Coming  