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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
feralvarez994
Helper II
Helper II

Group by another table

Hi everyone! I have a table with number of records (phone calls) by employee and want to group it by another table that have the ranges

The first table contains the employees that i need, the position and the user key in different systems

feralvarez994_1-1657039940323.png

The second table contains the month/year, the employee key number (related to Identificador_Anura) and the number of calls that every employee have made per month

feralvarez994_2-1657039965979.png

The lastone contains the position, the month/year (Mes/Año) and the range of calls depending on the position (0 - 200, 201 - 300, 301 - 9999, etc)

feralvarez994_0-1657039929084.png

 

I need to multiply the number of calls per employee with the "valor" column in the last table depending on the range that goes between "Cantidad desde" and "Cantidad hasta"

 

Can someone help me? Thanks a lot!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @feralvarez994,

You can add a calculated column to the second table to lookup values from the third table based on the current 'calls' value:

Result =
CALCULATE (
    MAX ( Table3[valor] ),
    FILTER (
        Table3,
        Table3[Cantidad desde] <= EARLIER ( Table2[Calls] )
            && Table3[Cantidad hasta] >= EARLIER ( Table2[Calls] )
    )
) * Table2[Calls]

Regaeds,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @feralvarez994,

You can add a calculated column to the second table to lookup values from the third table based on the current 'calls' value:

Result =
CALCULATE (
    MAX ( Table3[valor] ),
    FILTER (
        Table3,
        Table3[Cantidad desde] <= EARLIER ( Table2[Calls] )
            && Table3[Cantidad hasta] >= EARLIER ( Table2[Calls] )
    )
) * Table2[Calls]

Regaeds,

Xiaoxin Sheng

tamerj1
Super User
Super User

Hi @feralvarez994 

can you please share a screenshot of the visual and explain further the expected results. Also is there any relationship connecting the 3rd table?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.