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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AMPAllie
Helper II
Helper II

Measure that Sums and Finds Value in Another Table with A Range

I have two tables

Table 1 lists sales

AMPAllie_0-1602081281420.png

Table 2 is a commission struture

AMPAllie_1-1602081344359.png

I have a measure that sums Table1[Amount] placed in a gauge with Year, month, Sales Rep slicers.

What I need to accomplish is a measure in another guage that determines the commission amount.

So i need to create something that sums Table1.[Total], then takes that value and looks to see into which range in Table2 that value falls, and returns the corresponding Table2.[Commission].

 

I have attempted to break up the ranges in Power Query with ={[Range Start]..[Range End]} and list all values to more easily find a corresponding value, but I end up with a table that has over 25M rows which is inefficient.

 

Any help is much appreciated.

4 REPLIES 4
amitchandak
Super User
Super User

@AMPAllie ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Table 1

WBS1InvoiceNumberPeriodTransDateInvoiceDateTotalAmtPR.NamePR.ProjectCustomTabFields.Sales RepPR.Project TypeAmount
19028.00.000000000821422020011/25/2020 12:00:00 AM2019-12-04T12:05:31.5270000-18219PG&E EGI Reconductor ProjectsPerson 1Engineering18219
19028.00.000000000822652020022/12/2020 12:00:00 AM2/12/2020 12:00:00 AM-46339.39PG&E EGI Reconductor ProjectsPerson 2Engineering46339.39
19028.00.000000000823652020077/11/2020 12:00:00 AM4/2/2020 12:00:00 AM-89113.33PG&E EGI Reconductor ProjectsPerson 3Engineering89113.33

 

Table 2

 

Range StartRange EndCommission
5000000999999910000
100000001499999915000
150000001999999920000
200000002499999925000
250000003000000030000

 

Output would just be a number

It's being a buggar with uploading

Let's try this

 

Table 1

 

AMPAllie_1-1602085360003.png

 

Table 2

 

AMPAllie_0-1602085256444.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.