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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Ms_2
Frequent Visitor

Excel Lookup Table

Hi,

I would like to have a basic user modify their own power BI groups using a simple excel table.

We are trying to group certain activity types (the person deciding what the group number ranges need to be are not computer savvy). 

The Excel file has 3 columns:
Range Start,    Range End,      Group Name
12,000               12,999              Temporary Power Connection

 

There is a related list of activities which fall into those groups i.e

Activity ID     Description       Cost     Quantitiy

12,500             Crane Costs      $2000   10 hours

 

Basically, I need to import the excel file, create relationships between the Activity ID and the Range Start &  Range End values to determine the Group Name. 
Not sure how to write the DAX expression

IF(AND(

Activity ID => RELATED(Range Start),

Activity ID = < RELATED(Range End),

Group Name,

"error")

 

I thought about trying to do a lookupvalue but the Activity ID won't match the Activity ID Range. You could round the number and then match it but then it's not as dynamic anymore.
Am I going about this in the wrong way fundamentally? Any direction would be appreciated thank you.

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

Hi @Ms_2

 

Assuming table names are Table1 and Table2, add this calculated column in Table2 to get the Group Name

=calculate(
Values(Table1[Group Name]),
filter(table1,
Table2[Activity ID]>=Table1[Range Start]&&
Table2[Activity ID]<=Table1[Range End])
)

 

View solution in original post

2 REPLIES 2
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Ms_2

Please refer to solution @Zubair_Muhammad posted, which is right. If you have other issue, please feel free to ask. If you have resolved your problem, welcome to share your solution or mark the right reply as answer. More people will benefit from here.

Best Regards,
Angelia

Zubair_Muhammad
Community Champion
Community Champion

Hi @Ms_2

 

Assuming table names are Table1 and Table2, add this calculated column in Table2 to get the Group Name

=calculate(
Values(Table1[Group Name]),
filter(table1,
Table2[Activity ID]>=Table1[Range Start]&&
Table2[Activity ID]<=Table1[Range End])
)

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.