Hello ALL,
I'm encountering a problem/issue with this simple formula.
The problem must be with my data but I can't seem to figure out where?
So here's the Measure => County Total
County Total = CALCULATE ( [Total Net], ALL(Payments[Subcategory], Payments[Category]) ) Total Net = SUM ( Payments[Net] )
Basically I want the County Total to be listed in all rows of a Matix (so I can use as Denominator for a % calculation)
So I created some sample data to post here - Please note the formula works as intended with the sample data!
So the problem must be with my real data but I can't seem to figure out what could be causing this?
Any suggestions/ideas about what to look for would be greatly appreciated!
So with my real data theMeasure seems to ignore the ALL ... Payments[Category] part of the formula
So there are 3 tables involved in this calculation Locations, Assets and Payments
Locations Table
State | County | Location |
ST1 | County 1 | Location 1 |
ST1 | County 2 | Location 2 |
ST1 | County 2 | Location 3 |
ST1 | County 3 | Location 4 |
ST1 | County 3 | Location 5 |
ST1 | County 3 | Location 6 |
ST1 | County 3 | Location 7 |
Assets Table
Asset | Operator | Location |
Asset 1 | Operator 1 | Location 1 |
Asset 2 | Operator 2 | Location 2 |
Asset 3 | Operator 2 | Location 2 |
Asset 4 | Operator 2 | Location 2 |
Asset 5 | Operator 2 | Location 3 |
Asset 6 | Operator 3 | Location 4 |
Asset 7 | Operator 3 | Location 5 |
Asset 8 | Operator 3 | Location 6 |
Asset 9 | Operator 4 | Location 7 |
Payments Table
Company | Payment Date | Asset | Net | Category | Subcategory |
Company 1 | 12/1/2016 | Asset 1 | $300.00 | Cat 2 | Sub 2.1 |
Company 1 | 12/2/2016 | Asset 1 | $100.00 | Cat 3 | Sub 3.1 |
Company 3 | 12/15/2016 | Asset 2 | $100.00 | Cat 1 | Sub 1.1 |
Company 3 | 12/15/2016 | Asset 2 | $50.00 | Cat 1 | Sub 1.2 |
Company 3 | 12/15/2016 | Asset 2 | $25.00 | Cat 1 | Sub 1.3 |
Company 3 | 12/15/2016 | Asset 3 | $100.00 | Cat 1 | Sub 1.1 |
Company 3 | 12/15/2016 | Asset 3 | $50.00 | Cat 1 | Sub 1.2 |
Company 3 | 12/15/2016 | Asset 3 | $25.00 | Cat 1 | Sub 1.3 |
Company 3 | 12/15/2016 | Asset 4 | $100.00 | Cat 1 | Sub 1.1 |
Company 3 | 12/15/2016 | Asset 4 | $50.00 | Cat 1 | Sub 1.2 |
Company 3 | 12/15/2016 | Asset 4 | $25.00 | Cat 1 | Sub 1.3 |
Company 3 | 12/15/2016 | Asset 5 | $200.00 | Cat 1 | Sub 1.1 |
Company 3 | 12/15/2016 | Asset 5 | $150.00 | Cat 1 | Sub 1.2 |
Company 3 | 12/15/2016 | Asset 5 | $125.00 | Cat 1 | Sub 1.3 |
Company 4 | 12/20/2016 | Asset 6 | $75.00 | Cat 1 | Sub 1.2 |
Company 4 | 12/20/2016 | Asset 6 | $50.00 | Cat 1 | Sub 1.3 |
Company 4 | 12/20/2016 | Asset 7 | $75.00 | Cat 1 | Sub 1.2 |
Company 4 | 12/20/2016 | Asset 7 | $50.00 | Cat 1 | Sub 1.3 |
Company 4 | 12/20/2016 | Asset 8 | $75.00 | Cat 1 | Sub 1.2 |
Company 4 | 12/20/2016 | Asset 8 | $50.00 | Cat 1 | Sub 1.3 |
Company 2 | 12/21/2016 | Asset 7 | $25.00 | Cat 2 | Sub 2.2 |
Company 5 | 12/25/2016 | Asset 9 | $200.00 | Cat 2 | Sub 2.1 |
Again with the sample data the formula works fine - as intended!
I'm sure many of you have used something similar to calculate percentages.
Just hoping someone can suggest what to look for in my data that could be causing this???
Thanks!