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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
superbird
Frequent Visitor

Linking Measure to Column in another Table

Hi there,

 

I want to be able to link a Measure (Average of Column, round to nearest 1000) to a Column in another table.

 

Table 1 

ProductValue
A1000
B1245
C1300
D800
E1400

 

Measure1 = Average of Value = 1,149

to nearest 1000 = 1,000

 

Table 2

ValueOutput
1000Thousand
2000Two Thousand
3000Three Thousand
4000Four Thousand
5000Five Thousand

 

I want to link Measure1 (1,000) to Value Column (1,000) in Table 2, so that Output generated is 'Thousand' as per table above.

 

This needs to be dynamic because Measure1 may change depending on the Average generated.

 

What is easiest way to do this?

 

Thanks,

Phil

 

2 ACCEPTED SOLUTIONS
danextian
Super User
Super User

Hi @superbird 

 

Divide the average by a thousand and round it off to the nearest integer and then multiply it by 1000. Use that as lookup value.

 

AverageThousands =
LOOKUPVALUE (
    Table2[Output],
    Table2[Value], ROUND ( DIVIDE ( [Average], 1000 ), 0 ) * 1000
)

Value in table2 should always be unique for the lookup to work correctly.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

superbird
Frequent Visitor

thanks so much, that works 🙂
what if i have multiple output columns in table 2 - would i need to create a lookupvalue for each column? there is no way to create a relationship to save having to create multiple lookupvalues?

View solution in original post

3 REPLIES 3
superbird
Frequent Visitor

thanks so much, that works 🙂
what if i have multiple output columns in table 2 - would i need to create a lookupvalue for each column? there is no way to create a relationship to save having to create multiple lookupvalues?

Hi @superbird ,

 

Relationships will not work as you said that your average value is dynamic. You would have to use a calculated column to create a relationship that means  the average won't be dynamic anymore.

LOOKUPVALUE(
    <result_columnName>,
    <search_columnName>,
    <search_value>
    [, <search2_columnName>, <search2_value>]…
    [, <alternateResult>]
)

As you can see, LOOKUPVALUE accepts more than one search column and search value but only one result column. If you want your formula to point to another result column, say to Output2 column, creating another measure/column is necessary.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
danextian
Super User
Super User

Hi @superbird 

 

Divide the average by a thousand and round it off to the nearest integer and then multiply it by 1000. Use that as lookup value.

 

AverageThousands =
LOOKUPVALUE (
    Table2[Output],
    Table2[Value], ROUND ( DIVIDE ( [Average], 1000 ), 0 ) * 1000
)

Value in table2 should always be unique for the lookup to work correctly.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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