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
mohsinmasood
Frequent Visitor

slabs based factor lookup

Hi i am tring to pull slab based factor from my data

mohsinmasood_0-1721733914410.png

i have total count of 34,635 in one table and slabs on another table now i have to lookup slab rate which is 1.75 based on count of 34,635 which falls under 25001 - 36500.

 

count will increase every month and every time it should lookup the factor based on total counts

 

 

Count Table

 

mohsinmasood_1-1721734038295.png

 

Slab rate table

 

mohsinmasood_2-1721734076068.png

 

2 ACCEPTED SOLUTIONS
Irwan
Super User
Super User

hello @mohsinmasood 

 

please check if this accomodate your need.

1. create calculated column for calculating slab

Slab = 
CALCULATE(
    MAX('Table'[Slab]),
    FILTER(
        'Table',
        'Count'[Category]='Table'[Category]&&
        'Count'[Count]>'Table'[Start]&&
        'Count'[Count]<'Table'[End]
    )
)

Irwan_1-1721789280276.png

 

2. create calculated column for calculating slab rate

Slab Rate =
CALCULATE(
    MAX('Table'[Slab Rate]),
    FILTER(
        'Table',
        'Count'[Category]='Table'[Category]&&
        'Count'[Count]>'Table'[Start]&&
        'Count'[Count]<'Table'[End]
    )
)

Irwan_2-1721789299014.png

 

Hope this will help you.

Thank you.

 

View solution in original post

Anonymous
Not applicable

Hi @mohsinmasood 

 

For your question, here is the method I provided:

 

Here's some dummy data

 

“Count Table”

vnuocmsft_0-1721790271692.png

 

“Slab rate Table”

vnuocmsft_1-1721790295863.png

 

Create a measure.

Measure slabs = 
var _Category = SELECTEDVALUE('Count Table'[Category])
var _count = SELECTEDVALUE('Count Table'[Count])
RETURN
CALCULATE(
    SELECTEDVALUE('Slab rate Table'[Slab Rate]),
    FILTER(
        ALL('Slab rate Table'),
        'Slab rate Table'[Category] = _Category
        &&
        'Slab rate Table'[Start] <= _count
        &&
        'Slab rate Table'[End] >= _count
    )
)

 

Or create a column.

Column slabs = 
CALCULATE(
    SELECTEDVALUE('Slab rate Table'[Slab Rate]),
    FILTER(
        ALL('Slab rate Table'),
        'Slab rate Table'[Category] = 'Count Table'[Category]
        &&
        'Slab rate Table'[Start] <= 'Count Table'[Count]
        &&
        'Slab rate Table'[End] >= 'Count Table'[Count]
    )
)

 

Here is the result.

 

vnuocmsft_2-1721790421061.png

 

vnuocmsft_3-1721790441998.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @mohsinmasood 

 

For your question, here is the method I provided:

 

Here's some dummy data

 

“Count Table”

vnuocmsft_0-1721790271692.png

 

“Slab rate Table”

vnuocmsft_1-1721790295863.png

 

Create a measure.

Measure slabs = 
var _Category = SELECTEDVALUE('Count Table'[Category])
var _count = SELECTEDVALUE('Count Table'[Count])
RETURN
CALCULATE(
    SELECTEDVALUE('Slab rate Table'[Slab Rate]),
    FILTER(
        ALL('Slab rate Table'),
        'Slab rate Table'[Category] = _Category
        &&
        'Slab rate Table'[Start] <= _count
        &&
        'Slab rate Table'[End] >= _count
    )
)

 

Or create a column.

Column slabs = 
CALCULATE(
    SELECTEDVALUE('Slab rate Table'[Slab Rate]),
    FILTER(
        ALL('Slab rate Table'),
        'Slab rate Table'[Category] = 'Count Table'[Category]
        &&
        'Slab rate Table'[Start] <= 'Count Table'[Count]
        &&
        'Slab rate Table'[End] >= 'Count Table'[Count]
    )
)

 

Here is the result.

 

vnuocmsft_2-1721790421061.png

 

vnuocmsft_3-1721790441998.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Irwan
Super User
Super User

hello @mohsinmasood 

 

please check if this accomodate your need.

1. create calculated column for calculating slab

Slab = 
CALCULATE(
    MAX('Table'[Slab]),
    FILTER(
        'Table',
        'Count'[Category]='Table'[Category]&&
        'Count'[Count]>'Table'[Start]&&
        'Count'[Count]<'Table'[End]
    )
)

Irwan_1-1721789280276.png

 

2. create calculated column for calculating slab rate

Slab Rate =
CALCULATE(
    MAX('Table'[Slab Rate]),
    FILTER(
        'Table',
        'Count'[Category]='Table'[Category]&&
        'Count'[Count]>'Table'[Start]&&
        'Count'[Count]<'Table'[End]
    )
)

Irwan_2-1721789299014.png

 

Hope this will help you.

Thank you.

 

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.