SUMX(TBLNAME, 1)
SUMX(ALL(TBLNAME), 1)
SUMX(ALL(TBLNAME[COLNAME]), 1)
Does table expansion happen only in 1st and 2nd example? What about the 3rd example. Is there any general list of situations when table expansion occurs?
The table expansion happens for tables. When single columns are specified, there is no table expansion. Therfore for sample 3 there is no table expansion.
Assuming to have a model with a one to many relationship between table D and table F (on column ID) and a measure M
In a visual with D[cd] on the rows, the forumula
CALCULATE( [M], FILTER (ALL(F), F[cf] = val) )
uses expanded table therefore removing any existing filter over D
the formula
CALCULATE( [M], FILTER (ALL(F[cf]), F[cf] = val) )
instead only affects F[cf] column and doesn't affect filters over D table