Forum Discussion
aquamagreen
4 years agoFrequent Visitor
Sum MAX values based on two columns by day
Hi,
I have data that has all sales quotes by store by day. There are four stores and seven products I'm focusing on. I want to get the maximum amount of quotes each day for each store, but can only seem to get the total amount for the day. I need to add another condition that allows me to reference the store column but don't know how:
Max Returned Quotes =
SUMX (
SUMMARIZE ( Trading_Data, Trading_Data[Date], "MaxCount", MAX ( Trading_Data[ReturnedQuotes]) ),
[MaxCount]
)
You can add the Store column to your SUMMARIZE too, and then use MAXX instead of SUMX.
Pat
2 Replies
- mahoneypat
Microsoft Employee
You can add the Store column to your SUMMARIZE too, and then use MAXX instead of SUMX.
Pat
- aquamagreenFrequent VisitorMax Quote =SUMX (SUMMARIZE ( Trading_Data, Trading_Data[Date], Trading_Data[store], "MaxCount", MAXX(Trading_Data,[MaxQuotes] ) ) ,[MaxCount])
Is this what you meant? It looks like it works. Thank you!