cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper II

## Bucket Sales Managers by their performance for a specific time frame

Hi,

I am trying to male a report with buckets for our managers according to the performance they had last quarter. The goal is to make a matrix where I can report the number of managers belonging to each group according to how many leads they generated.

To do this, I started by setting up a new table which looks like this:

After that I added a measure counting the number of unique leads:

Thirdly, I added a measure with filter and values functions:

COUNTROWS(
FILTER('Bucket Table',
[Count Leads] >= 'Bucket Table'[Lower Bucket]
&&   [Count Leads] <= 'Bucket Table'[Upper Bucket]))
> 0))

I tried using this measure in a matrix and got no results. There is something here that I really don't understand as to how create a segmentation based on a measure. Can anybody check this logic and explain how to write the measure correctly?
1 ACCEPTED SOLUTION
Super User

Hi @Berl21
I assume that you will be slicing by 'Bucket Table'[# Leads] column. You can try the following measure

``````Leads Group =
VAR LowerLimit =
SELECTEDVALUE ( 'Bucket Table'[Lower Bucket] )
VAR UpperLimit =
SELECTEDVALUE ( 'Bucket Table'[Upper Bucket] )
VAR T1 =
VAR T2 =
VAR T3 =
RETURN
COUNTROWS ( T3 )``````
5 REPLIES 5
Helper II

@tamerj1

Here you go for the desired result:

Expected result:

As a new user it seems I can't upload a pbix file here. Maybe I am wrong about this, can you let me know how that works? Unfortunately Dropbox is also not cooperating as of now.

Super User

Helper II

Hi @tamerj1

not sure how you mean the slicing? For now, it is uneffective:

The measure in this graph should be the number of unique managers, right? I used distinctcount for this one.

Super User

@Berl21
Would you please present sample data and the expected result based on the same sample? Otherwise please try the following

``````Unique ZHs =
SUMX (
VALUES ( 'Bucket Table'[Bucket] ),
VAR LowerLimit = 'Bucket Table'[Lower Bucket]
VAR UpperLimit = 'Bucket Table'[Upper Bucket]
VAR T1 =
VAR T2 =
RETURN
COUNTROWS ( T2 )
)``````
Super User

Hi @Berl21
I assume that you will be slicing by 'Bucket Table'[# Leads] column. You can try the following measure

``````Leads Group =
VAR LowerLimit =
SELECTEDVALUE ( 'Bucket Table'[Lower Bucket] )
VAR UpperLimit =
SELECTEDVALUE ( 'Bucket Table'[Upper Bucket] )
VAR T1 =
VAR T2 =
VAR T3 =
RETURN
COUNTROWS ( T3 )``````

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors