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 ) )
gmsamborn
1 year agoSuper User
Hi stribor45
Without sample data, this is just a guess:
EVALUATE
SUMMARIZE(
ADDCOLUMNS (
DISTINCT (
UNION (
DISTINCT ( 'A'[ID] ),
DISTINCT ( 'B'[ID] )
)
),
"@COUNTRY",
MINX (
FILTER (
ADDRESS,
ADRESS[USERID] = FORMAT ( [ID], "0" )
),
RELATED ( 'Flags'[Country] )
)
),
[Country],
"Count", COUNT ( [ID] )
)
If that doesn't help, could please supply sample data to work with?
- stribor451 year agoPost Prodigy
I know without data is hard. I tried that before I posted as I was pretty sure it will work but kept complaining that it cant find [ID]