Forum Discussion
stribor45
1 year agoPost Prodigy
How to summarize virtual table table
I am trying to summarize this virtual table (non base table) and of course I am getting error that the base table is expected. Can someone assist please. DEFINE
VAR C =
ADDCOLUMNS (
...
- 1 year ago
Missed the @ sign 😅
DEFINE VAR C = ADDCOLUMNS ( DISTINCT ( UNION ( DISTINCT ( 'A'[ID] ), DISTINCT ( 'B'[ID] ) ) ), "@COUNTRY", MINX ( FILTER ( ADDRESS, ADRESS[USERID] = FORMAT ( [ID], "0" ) ), RELATED ( 'Flags'[Country] ) ) ) EVALUATE GROUPBY ( C, [@Country], "Count", SUMX ( CURRENTGROUP (), 1 ) )
stribor45
1 year agoPost Prodigy
I tried it and error received was COUNTRY specified in the GROUPBY function was not found in the table
tamerj1
1 year agoCommunity Champion
Missed the @ sign 😅
DEFINE
VAR C =
ADDCOLUMNS (
DISTINCT ( UNION ( DISTINCT ( 'A'[ID] ), DISTINCT ( 'B'[ID] ) ) ),
"@COUNTRY",
MINX (
FILTER ( ADDRESS, ADRESS[USERID] = FORMAT ( [ID], "0" ) ),
RELATED ( 'Flags'[Country] )
)
)
EVALUATE
GROUPBY ( C, [@Country], "Count", SUMX ( CURRENTGROUP (), 1 ) )