Forum Discussion
kdrees21
4 years agoHelper I
Max Count Help
I have data that shows Location, shift, and weekday, and customer ID. What I am trying to accomplish is finding the maximum number of customers on any day and any shift to determine the maximum ...
- 4 years ago
This version should be simpler and more efficient:
MaxCustomers = MAXX ( SUMMARIZE ( CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[Location] ) ), Data[Location], Data[Shift], Data[Weekday], "@Count", COUNT ( Data[Customer ID] ) ), [@Count] )This should work as a measure or a calculated column.
AlexisOlson
4 years agoSuper User
This version should be simpler and more efficient:
MaxCustomers =
MAXX (
SUMMARIZE (
CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[Location] ) ),
Data[Location],
Data[Shift],
Data[Weekday],
"@Count", COUNT ( Data[Customer ID] )
),
[@Count]
)
This should work as a measure or a calculated column.