Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
bdmichael09
Helper II
Helper II

Seemingly simple measures causing visual to exceed available resources

I've been racking my brain trying to figure this out and can't quite understand how my very small model and seemingly simplistic measures are totally destroying a matrix visual to the point where I get the "Visual has exceeded the available resources" error. 

 

The intention is to create a visual that shows how well sales employees are hitting their monthly goals and to rank them based on that Pace to Goal. My data table has only 41k rows with a relationship to one Dim table that just serves as a way to translate employee specialties into something you can read and to also bucket those specialties. Like I said, very small model. 

 

image.png

 

The matrix itself is simple. I have the Specialty Bucket and the Employee in my rows. Columns is just the Month. My values is Production Count, Production Goal, Pace to Goal, and Percent Rank

image.png

My Production Count and Goal measures are extremely simple SUM measures

Production Count = 
sum(Query1[Prorated Milestones])
Production Goal = 
SUM(Query1[MilestoneUnitGoal])

Pace to Goal is also just the very straight forward division of Count and Goal

Pace to Goal = 
VAR MilestoneCount = [Production Count]
VAR MilestoneGoal = [Production Goal]
Return DIVIDE(MilestoneCount,MilestoneGoal)


To get at the end Percent Rank, I wanted to simulate the kind of functionality you get using PERCENT_RANK in SQL. I tried to get the DAX PERCENTILE functions to do what I wanted but that seemed to be a dead end. So my solution was to break down what PERCENT_RANK does into component pieces. I needed to get a count of Employees that fall under each Bucket (inside of any particular month) as well as Rank order those Employees on their Pace to Goal, then subtract position from count. 

Employee Count = 
    CALCULATE(
        DISTINCTCOUNT(Query1[Employee]),
        REMOVEFILTERS(Query1[Level 2 Leader]),
        REMOVEFILTERS(Query1[Level 1 Leader]),
        REMOVEFILTERS(Query1[Employee]),
        REMOVEFILTERS(Query1[SpecialtyDescription])
    )
Rank = 
    CALCULATE(
        RANK( ALLSELECTED(Query1[Employee]), ORDERBY([Pace to Goal], DESC ) ),
        REMOVEFILTERS(Query1[Level 1 Leader]),
        REMOVEFILTERS(Query1[Level 2 Leader]),
        REMOVEFILTERS('Query1'[SpecialtyDescription])
    )
PercentRank = 
var numerator = [Employee Count] - [Rank]
var denom = [Employee Count]
return DIVIDE(numerator,denom)

If I do all of this, it works. You can see in the screenshot it works almost exactly like I want it to (minor issue of it tries to assign the 100% value to the bucket total, but it's not a huge deal and not my biggest fish to fry). My problem is that if I try to filter to the one of the larger buckets and use more than just 1 month of data, it says I'm using too many resources and the visual breaks. There are only ~1,000 people in the largest bucket, so I'm kind of baffled that needing to do these calculation for 1,000 people over more than 1 month is somehow crippling to PowerBI. My suspicion is that the use of REMOVEFILTER is the culprit somehow, but the lack of using that function breaks what I'm trying to accomplish. 

 

Any ideas on what might be the issue here? Are there alternatives to my method that are more performant?

1 REPLY 1
lbendlin
Super User
Super User

You know you can combine all the REMOVEFILTERS  into one, right?

 

Use DAX Studio to examine the query plan for excessive record counts.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors