Forum Discussion
Calculation sumX multiplication
Hello;
i'm performing my calculation with the sumX function, in a simplified way, my code has the following form:
measure=sumx(A)*sumx(B)*sumx(C)
i'm getting the results as ( A1 + A2 + A3 ...)*(B1 + B2 + B3 ...)*(C1 + C2 + C3 ...)
What should i do in order to have my calculation performed in the following form:
(A1*B1*C1) + (A2*B2*C2) + (A3*B3*C3) + ... ?
Hi Anonymous
Here is a sample file with the solution https://www.dropbox.com/t/obELBigMGJIPqhHdActually I have tried the same solutions and they seem to work. The thing is it won't allow me to create the hierarchy slicer with pop-up a message saying that the relationship should be One - Many. I don't know how did you create it but arbitrarily shaped slicers usually causes trouble. Using them would require the use of KEEPFILTERS. Unfortunately I failed to simulated your case but you can refer to (2) When to use KEEPFILTERS over iterators - YouTube
Following two workable solutions but using normal slicers.
19 Replies
- CNENFRNLCommunity Champion
Follow this pattern = SUMX( Table, Table[ColA] * Table[ColB] * Table[ColC] )- AnonymousNot applicable
but the values of A, B and C are from different tables.
(i'm using a hierarchy slicer in order to choose which value corresponds to which one)
- tamerj1Community Champion
Hi Anonymous
are they in the same table or different tables?- AnonymousNot applicable
different tables
- tamerj1Community Champion
Anonymous
Do they have 1:1 relationships? I mean how do you know which row to multply with which row? As you mentioned (A1*B1*C1) + (A2*B2*C2) + (A3*B3*C3) + ... or do you mean (A1*B1*C1) + (A1*B1*C2) + (A1*B1*C3) + ... ?
- AnonymousNot applicable
actually 2 of the values are in the same table; and if i use this
this pattern = SUMX( Table, Table[ColA] * Table[ColB])for the 2 values in the same table i get the right value (A1*B1)+(A2*B2)...
but it's not working when i try to add the 3rd Value (C) which is in another table
- tamerj1Community Champion
Hi Anonymous
Here is a sample file with the solution https://www.dropbox.com/t/obELBigMGJIPqhHdActually I have tried the same solutions and they seem to work. The thing is it won't allow me to create the hierarchy slicer with pop-up a message saying that the relationship should be One - Many. I don't know how did you create it but arbitrarily shaped slicers usually causes trouble. Using them would require the use of KEEPFILTERS. Unfortunately I failed to simulated your case but you can refer to (2) When to use KEEPFILTERS over iterators - YouTube
Following two workable solutions but using normal slicers.
- AnonymousNot applicable
Hello, Thank you tamer for your help i really appreciate it!
it worked with the KEEPFILTERS function!!