Forum Discussion
TravisGlanzer
5 years agoFrequent Visitor
SumX Total
I finally figured out a DAX to calculate the product of two attributes without creating a table: That produces the third column below which looks great. The total row is off though as it i...
- 5 years ago
Let me give you an example:
In the above picture :
SalesQty V1 = SUM( Sales[Quantity] )SalesQty V2 = [SalesQty V1] +1000
you can see the total number of SalesQty V2 is incorrect. Because in the total line there is no filter.
So the calculation logic of the total number is to calculate all category sales quantity +1000, 140180+1000. But that's not your expectation. Your expectation is to SUM all the values in the Sales Qty V2 column in the matrix. At this time you need to do like the below picture to get the correct result.
jameszhang0805
Resolver IV
5 years agoHi, please try to use this method: Use SUMX+VALUES to wrap your Return.
SUMX(VALUES( the column of current row contents in your matrix ), Return Result)
TravisGlanzer
5 years agoFrequent Visitor
Appreciate your response. Feel very ignorant here as I am not quite sure what you mean. Do you mean:
Sumx(Values(PhlebAttemptsper,Weightingper))
It keeps wanting a table. Or are you suggesting in the next metric, "WeightedCollStaffProcTotal" to create the sumx? I keep getting the request for a table name???
- jameszhang08055 years ago
Resolver IV
Let me give you an example:
In the above picture :
SalesQty V1 = SUM( Sales[Quantity] )SalesQty V2 = [SalesQty V1] +1000
you can see the total number of SalesQty V2 is incorrect. Because in the total line there is no filter.
So the calculation logic of the total number is to calculate all category sales quantity +1000, 140180+1000. But that's not your expectation. Your expectation is to SUM all the values in the Sales Qty V2 column in the matrix. At this time you need to do like the below picture to get the correct result.