cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rax99 Member
Member

Compare your score against your team/ Department/ Org etc

Sorry guys Im a bit of a newb to this PBI stuff. Havent seen this question answered in this specific context.

 

So here are a few rows from the dummy Table1:

 

SalesIDDateAgentIdPrimary_SkillSub_SkillQualitySatisfactionPerm RevTemp RevTeamIDDeptIDOrg
115268486201ICRComm50733.6869.15T3D2WM
215263841772ICRComm5284.3028.82T2D1WM
315260216743ICRResi21744.6335.43T3D2WM
415261109884ICRResi59750.039.41T3D2WM
515263536955ICRComm62950.8412.36T1D1WM
615275993166ICRComm88630.8045.97T4D1WM
715255867527ICRComm14953.0884.90T1D1WM
815275521568ICRResi24980.8069.96T2D2WM
915254993269ICRResi56985.003.58T3D2WM
10152566080410ICRResi41428.3625.45T3D1WM
11152652415211ICRResi10533.9169.45T4D1WM
12152642473712ICRResi1847.9047.24T3D1WM
13152773988513ICRResi15844.5842.44T2D2WM
14152642672714ICRComm68278.3681.72T3D1WM
15152677826115ICRComm7980.0542.79T2D2WM
16152745728316ICRResi93826.2142.97T1D2WM
17152539797817ICRComm8496.464.36T4D2WM
18152562481418ICRResi41458.0927.40T3D1WM
19152621329019ICRResi15870.6699.78T3D1WM
20152757341120ICRComm35919.8942.19T1D2WM
            

 

So what I need is a calc to evaluate an individuals Avg Quality score against the Team he is in. And also a calc to compare against the Dept. And one for the org. 

 

EG, compare AgentID=1 against his Team of TeamID = T3.

 

Ive tried using something like:

AvgDeptQualityScoreComp = CALCULATE(AVERAGE(Table1[Quality]),ALL(Table1), Table1[TeamID])  - but it doesnt like the last filter as its looking for an explicit value or T/F.

 

I dont want the give TeamID a specific value as this will need to change depending on the AgentID filtered on the page.

 

2 REPLIES 2
Anonymous
Not applicable

Re: Compare your score against your team/ Department/ Org etc

Hi, this should do what you're after, it will only return a value when there is a filter applied to the agent id column. Let me know if it helps!

 

Team Average =  
   VAR Team =
        MAX ( Sales[TeamID] )
    RETURN
        IF (
            ISFILTERED ( Sales[AgentId] ),
            CALCULATE ( AVERAGE ( Sales[Quality] ), Sales[TeamID] = Team ),
            BLANK ()
        )
Department Average =  
   VAR Department =
        MAX ( Sales[DeptID] )
    RETURN
        IF (
            ISFILTERED ( Sales[AgentId] ),
            CALCULATE ( AVERAGE ( Sales[Quality] ), Sales[DeptID] = Department ),
            BLANK ()
        )

 

rax99 Member
Member

Re: Compare your score against your team/ Department/ Org etc

This didnt appear to wrk. But  think it could be an issue with my dataset. I have redone the data structure and will repost the question. However thanks for your help, and apologies.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 308 members 3,189 guests
Please welcome our newest community members: