-
1. Re: Cannot mix agg and non agg
Zhouyi ZhangFeb 1, 2019 2:50 AM (in response to Alan B)
Hi, Alan
try this
if [sales] ={Fixed: max(sale)}
then [employee]
end
ZZ
-
-
3. Re: Cannot mix agg and non agg
Zhouyi ZhangFeb 1, 2019 4:57 AM (in response to Alan B)
Hi, Alan
Can you provide a sample workbook?
ZZ
-
4. Re: Cannot mix agg and non agg
Zhouyi ZhangFeb 1, 2019 4:58 AM (in response to Alan B)
Anything with aggregation should based on some dimension values, that's why I need to know a sample workbook
-
5. Re: Cannot mix agg and non agg
Jim DehnerFeb 1, 2019 5:15 AM (in response to Alan B)
Good morning
Little confused - most expensive and maximum number of sales are different things
If you are looking for the most expensive item you would need to have Item in your expression something like {fixed [item] : sum(sales)/sum(quantity) } to get and average selling price per Item (ASP)
Then you would use that to determine the most expensive as Most expensive = {fixed :Max(asp)}
and determine the Item if [ASP] = [Most Expensive] then [Item] end
and then find the employees that sold that item = can be done with filter or conditional
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.