Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have this measure which calcuates the average % Call/Available time for each adviser by the vlaue of each day
AVG % Call/Available = AVERAGEX(ADDCOLUMNS(SUMMARIZE(AdviserRole,
AdviserRole[AdviserId],
'Date'[Date]),
"PctCall", [% Call/Available Time]
),
[PctCall])
I want to calculate what the value is for all advisers over previous 3 months to use as a KPI
% Call/Available High =
VAR
MaxDate=MAX('Date'[Date])
RETURN
CALCULATE([AVG % Call/Available], DATESINPERIOD('Date'[Date],MaxDate,-3,MONTH),ALLSELECTED(AdviserRole[AdviserId]))
I have tried numerous versions of ALL and al lproduce the same result
I have the date slicer as 1/9 to 18/9 so the datesin period is working as for each adviser it is calculating last 3 months. However I'm trying to get each row to show 47% which is the average over everyone selected. I've tried ALL(AdviserRole)
I've done this in the past and just can't figure why this doens't just work?
Any help appreicate as sure it trivial
Solved! Go to Solution.
@masplin
Can you replace ID with Name as below?
% Call/Available High =
VAR
MaxDate=MAX('Date'[Date])
RETURN
CALCULATE([AVG % Call/Available], DATESINPERIOD('Date'[Date],MaxDate,-3,MONTH),ALLSELECTED(AdviserRole[Name]))
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@masplin
Can you replace ID with Name as below?
% Call/Available High =
VAR
MaxDate=MAX('Date'[Date])
RETURN
CALCULATE([AVG % Call/Available], DATESINPERIOD('Date'[Date],MaxDate,-3,MONTH),ALLSELECTED(AdviserRole[Name]))
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Ok that works!!! Dont quite understand why as AdviserID and Name are columns on same talbe and each is unique to a user.
Is this because [Name] is the field used in the SUMMARIZE expression?
Thanks a lot
Problem is its producing a result even for names who have not been selcted by the team and userrole slicers. I was expecting blanks since there names are selected?
I tried this but it doesnt do anything
CALCULATE([AVG % Call/Available], DATESINPERIOD('Date'[Date],MaxDate,-3,MONTH),ALLSELECTED(PhoneUser[Name]),ALLSELECTED(Team[Team]),ALLSELECTED((AdviserRole[UserRole])))
Phoneuser and Adviserrole are interchangeable as long as I use the same in both measures and on the table.
If I take the meausr eout I just have names in that team and userrole
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
99 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |