Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mikegrattan
Creator III
Creator III

Using Sum(TOTAL fieldname) only works when I select a value from another field

I am attempting to get a percentage of total for each record in a Work Order.  My current expression is:

Sum(EU_RecQty) / Sum(Total EU_RecQty)

This gives me the percentage of the total received, but only when I am filtering on a specific Work Order.  I then multiply this percentage by Acres to get a breakdown of acres for each record in the Work Order.  Here's a sample of the result when I filter on a specific Work Order:

mikegrattan_1-1646072485893.png

When I remove the Work Order filter and only filter on some other dimensions such as Season and Location, the numbers change.

mikegrattan_2-1646072689611.png

 

I realize the scope has changed and I probably need to add a filter to my expression using Set Analysis; however, I am having a problem figuring out the right solution.  Do I use Aggr, or just add filters to my existing expression? (I've tried both but I'm not getting good results).

Now, the question is how do I adjust the expression so it will work when I am not filtering on a specific Work Order? 

Thank you for any assistance!

 

 

 

Labels (1)
1 Solution

Accepted Solutions
Digvijay_Singh

Check if this gives the right value without using filter

Sum(EU_RecQty) / Sum(Total<WO> EU_RecQty)

View solution in original post

2 Replies
Digvijay_Singh

Check if this gives the right value without using filter

Sum(EU_RecQty) / Sum(Total<WO> EU_RecQty)

mikegrattan
Creator III
Creator III
Author

This works nicely...thank you.