Forum Discussion
Modify table that a SUMX points to
- 4 years ago
Hi Yeztrom
The table expression cannot be dynamic. Instead, you can create 4 measures for the switch with different table names in them. For example,
Total1 = SUMX('table1',[field]) Total2 = SUMX('table2',[field]) Total3 = SUMX('table3',[field]) Total4 = SUMX('table4',[field])Then create a switch measure based on different conditions:
Result = SWITCH ( TRUE (), condition1, [Total1], condition2, [Total2], condition3, [Total3], condition4, [Total4] )Hope this helps
----------------------------------------------------------------------
If this reply helps solve the problem, please mark it as Solution! Kudos are appreciated too!
Hi Yeztrom
The table expression cannot be dynamic. Instead, you can create 4 measures for the switch with different table names in them. For example,
Total1 = SUMX('table1',[field])
Total2 = SUMX('table2',[field])
Total3 = SUMX('table3',[field])
Total4 = SUMX('table4',[field])
Then create a switch measure based on different conditions:
Result =
SWITCH (
TRUE (),
condition1, [Total1],
condition2, [Total2],
condition3, [Total3],
condition4, [Total4]
)
Hope this helps
----------------------------------------------------------------------
If this reply helps solve the problem, please mark it as Solution! Kudos are appreciated too!