cancel
Showing results for
Did you mean:
Highlighted
Post Prodigy

## Struggling to get ALL to ALL!!!

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,
'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

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion

@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 🙂

3 REPLIES 3
Highlighted
Community Champion

@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 🙂

Highlighted
Post Prodigy

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

Highlighted
Post Prodigy

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

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Microsoft Power Platform Communities

Check out the Winners!

#### Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors