How can I find the dimension with the most/least value by a particular calculated measure, partinied by another dimension?
I have this calculated field that returns the date with the most orders by a customer (phone_number):
firstValue( SHIFTDATE, [distinct_count(OrderKey) DESC],[{PHONE_NUMBER}])
When I add it to the table below:
I get this error:
If I add the {SHIFTDATE} field to the table, the table works, but now I have a row for every Shiftdate and phone number, which I don’t want.