Forum Discussion
Create Measure From Virtual Table
- 2 years ago
well, you can t use summarizecolumns in measure
try using addccolumns ( summarize ( .. ) instead .
and for the return, just return aggregation without the { } .
the { } were only needed for the query not to be used in the measure.
hope this makes sense.
VAR _aggtable =
maxx(,
FILTER(
GROUPBY(
_summarytable,
[Distributor Type],
"Number Of Customers", COUNTX( CURRENTGROUP(),1)
),
[Distributor Type]="New Tank Distributor"
),
[Number Of Customers]
)
should be something like this.
Ah, sorry. the error states: The 3 argument to the MAXX function contains a flag that is not supported.
Its bizarre that converting a table value to scalar is this difficult.
- Daniel291952 years agoCommunity Champion
- mmahoney0452 years agoRegular Visitor
Here is the code:
VAR _aggtable =MAXX(,FILTER(GROUPBY(_summarytable,[Distributor Type],"Number Of Customers", COUNTX( CURRENTGROUP(),1)), [Distributor Type]="New Tank Distributor"),[Number Of Customers])EVALUATE_aggtable- Daniel291952 years agoCommunity Champion