Forum Discussion
stribor45
Post Prodigy
1 year agoHow 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 ) )
tamerj1
Community Champion
1 year agoHi stribor45
please try
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
Post Prodigy
1 year agoI tried it and error received was COUNTRY specified in the GROUPBY function was not found in the table