Forum Discussion
Charcho
Helper I
1 year agoOperations SUMX table simple related
Hello, I have a beginner's question: How can I sum the values of attributes (A, B) and display the result in a new matrix for each? I created a DAX formula with SUMX, but it's not giving me the corre...
- 1 year ago
Ashish_Mathur rajendraongole1 Deku solved my issue! Here's the link with the solution.
I created two dimension tables (Fruit and Attribute) and established a relationship between them. The code I needed was. What do you think? Thank you
Difference_Table2_Table1 =VAR SelectedAttribute = SELECTEDVALUE(Table1[Attribute], "None")VAR T_table2 =SUMX(FILTER(Table2,Table2[Attribute] = SelectedAttribute || SelectedAttribute = "None"),Table2[Value])VAR T_table1 =SUMX(FILTER(Table1,Table1[Attribute] = SelectedAttribute || SelectedAttribute = "None"),Table1[Value])RETURNT_table2 - T_table1
Charcho
Helper I
1 year agoAshish_Mathur rajendraongole1 Deku solved my issue! Here's the link with the solution.
I created two dimension tables (Fruit and Attribute) and established a relationship between them. The code I needed was. What do you think? Thank you
Difference_Table2_Table1 =
VAR SelectedAttribute = SELECTEDVALUE(Table1[Attribute], "None")
VAR T_table2 =
SUMX(
FILTER(
Table2,
Table2[Attribute] = SelectedAttribute || SelectedAttribute = "None"
),
Table2[Value]
)
VAR T_table1 =
SUMX(
FILTER(
Table1,
Table1[Attribute] = SelectedAttribute || SelectedAttribute = "None"
),
Table1[Value]
)
RETURN
T_table2 - T_table1