Forum Discussion
LeoQ
Helper I
5 years agoAverages with small multiples charts
Hi everybody! I have been trying to solve this for days, but I couldn't find a solution. I have a measure that calculates the average amount of mails answered by agents for day. With that informatio...
- Anonymous5 years ago
Hi LeoQ ,
You can create a measure as below to get it, please find all the details in the attachment.
Conditonal formatting = VAR _averageofperday = CALCULATE ( AVERAGE ( 'Table'[Value] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = SELECTEDVALUE ( 'Table'[Date] ) ) ) VAR _averageofperagent = CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = SELECTEDVALUE ( 'Table'[Date] ) && 'Table'[AGENT] = SELECTEDVALUE ( 'Table'[AGENT] ) ) ) RETURN IF ( _averageofperagent < _averageofperday, "red", "green" )Best Regards
mahoneypat
Microsoft Employee
5 years agoYou likely need an expression like this for your bar color.
BarColor =
VAR vThisAgent = [YourAgentDayAvgMeasure]
VAR vAllAgents =
CALCULATE ( [YourAgentDayAvgMeasure], ALLSELECTED ( Table[Agent] ) )
RETURN
IF ( vThisAgent > vAllAgents, "Green", "Red" )
Pat
- LeoQ5 years ago
Helper I
Hi, thanks for your time. The problem is that I need to compare the absolute amount of mails answered per day per agent, but compare it with the average of all agents in the same day. I tried your formula, but it color all the columns the same.