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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Allan_Zeng
Frequent Visitor

Lookup value

Hello Team,

 

Can someone help to support this issue?

I have 2 tables as below: 

Table "Factor List":

Allan_Zeng_1-1663831299058.png

Table "Individual" :

Allan_Zeng_2-1663831374248.png

The column "Factor" in red is the result that I wanted.

The result column is base on Department, Role and Target% to find the data range in Table "Factor", 

Then capture the lower level value if didn't meet Target%.

Is this possible in Power BI?

Thank you in advance!

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Allan_Zeng 

you can create a column

Column = 
var _target=maxx(FILTER('Factor List','Factor List'[Department]='Individual'[Department]&&'Factor List'[Role]=Individual[Role]&&'Factor List'[Target%]<='Individual'[Target%]),'Factor List'[Target%])
return maxx(FILTER('Factor List','Factor List'[Department]=Individual[Department]&&'Factor List'[Role]=Individual[Role]&&'Factor List'[Target%]=_target),'Factor List'[Factor])

1.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
ryan_mayu
Super User
Super User

@Allan_Zeng 

you can create a column

Column = 
var _target=maxx(FILTER('Factor List','Factor List'[Department]='Individual'[Department]&&'Factor List'[Role]=Individual[Role]&&'Factor List'[Target%]<='Individual'[Target%]),'Factor List'[Target%])
return maxx(FILTER('Factor List','Factor List'[Department]=Individual[Department]&&'Factor List'[Role]=Individual[Role]&&'Factor List'[Target%]=_target),'Factor List'[Factor])

1.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hello Ryan,

 

Thanks a lot for your solution!

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




tamerj1
Community Champion
Community Champion

Hi @Allan_Zeng 
Please use

Factor =
VAR CurrentDepartment = Individual[Department]
VAR CurrentRole = Individual[Role]
VAR CurrentTarget = Individual[Target%]
VAR FactorList =
    FILTER (
        'Factor List',
        'Factor List'[Department] = CurrentDepartment
            && 'Factor List'[Role] = CurrentRole
    )
VAR T1 =
    ADDCOLUMNS (
        FactorList,
        "@Difference", ABS ( 'Factor List'[Target%] - CurrentTarget )
    )
VAR T2 =
    TOPN ( 1, T1, [@Difference], ASC )
RETURN
    MAXX ( T2, [Factor] )

Hllo  @tamerj1 ,

 

Thank you so much for your promopt reply!

While I find there is something wrong as below.

Would you please help to double check?

Thank you!

Allan_Zeng_0-1664170754206.png

 

 

Hi @tamerj1 ,

 

Thank you so much for your promopt reply!

While I find there is something wrong as below.

Would you please help to check?

Thank you!

Allan_Zeng_0-1663894570418.png

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.