Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Max value by User in direct query

I have username and sale_no column in my user table. Now I want find max of sales_no for each user. In import mode, I have created calculate column as:

=CALCULATE (

MAX ( user[sales_no] ),

ALLEXCEPT ('user',user[full_username]

))

The same thing I want to achieve in direct query. But I came to know in direct query, for calculated column we cannot use calculate function. Is there any way to achieve same via measure or calculated column in direct query.

Thanks in advance.