cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FRG Member
Member

Total with many condition

Hi,

Here's my table:

Capture.JPG

 

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.

 

I hope I gave enough information to receive your help.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
FRG Member
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))

Thanks for your support.

View solution in original post

5 REPLIES 5
lc_finance Senior Member
Senior Member

Re: Total with many condition

Hi @FRG ,

 

 

You can download my proposed solution from here.

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:

Run length.png

 

Does this help you?

 

LC

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

FRG Member
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.

Thanks for your time.

lc_finance Senior Member
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:

Run length.png 

 

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
Member

Re: Total with many condition

Hi,

This is a screen shot of expected result when filtered bu User_ID and Length.

Capture.JPG

This is the complexity. I'm looking for a measure who gives expecting result with many different filter.

Thanks

FRG Member
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))

Thanks for your support.

View solution in original post

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)