Forum Discussion
kdrees21
Helper I
4 years agoMax 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
Super User
4 years agoThis 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.