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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
unknown917
Helper III
Helper III

alternative to lookupvalue & related??

Hello,

 

I have 2 tables in which I have a many to 1 relationship between IDs.  I need to look up the ID (text) from table 1 and return a measure value (number) in table 2.  The measure is calculated from what if parameters.  I understand that measures cannot be used in LOOKUPVALUE.  RELATED does not also recognize measures.

 

Below is an example of my dataset.  

 

Table 1
ID
1
2
3
1
4
3
2
6
7
5
5
8

 

Table 2 
IDValue (measure)
115
223
378
454
52
636
714
85

 

My expected output is:

 

Table 1 
IDOutput
115
223
378
115
454
378
223
636
714
52
52
8

5

 

Do I have any options, or do I need to rethink my approach?  The what if parameters are an attempt to allow the end user to enter manual data to update the report.

 

(SWITCH?, maxx(filter(table1,table1(ID)=table2(ID)),table2(Value))???

 

Any help would be greatly appreciated!

4 REPLIES 4
v-nuoc-msft
Community Support
Community Support

Hi @unknown917 

 

Can you tell me if your problem is solved? If yes, please accept it as solution.

 

Regards,

Nono Chen

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

v-nuoc-msft
Community Support
Community Support

Hi @unknown917 

 

Thank you very much lbendlin for your prompt reply.

 

Here is a simple example of my design for your problem, try the following:

 

Here's some dummy data

 

vnuocmsft_3-1726475442677.png

 

vnuocmsft_1-1726475294577.png

Value (Measure) = 
var _whatifparameter = SELECTEDVALUE('WhatIfParameter'[WhatIfParameter])
RETURN
IF(
    ISFILTERED('WhatIfParameter'[WhatIfParameter]),
    SELECTEDVALUE('Table 2'[Value]) * _whatifparameter,
    SELECTEDVALUE('Table 2'[Value])
)

vnuocmsft_0-1726475271543.png

 

Create a measure.

 

Output = 
MAXX(
    FILTER(
        'Table 2', 
        'Table 2'[ID] = SELECTEDVALUE('Table 1'[ID])
    ),
    'Table 2'[Value (Measure)]
)

 

Here is the result.

 

vnuocmsft_2-1726475416336.png

 

If you still have problems, it is best to provide the pbix file and be careful to delete sensitive data.

 

Regards,

Nono Chen

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

 

lbendlin
Super User
Super User

If you already have a relationship then let it do the work for you.

 

What is the measure computing?

The measure is calculating from other measure in the table.  There are several what if parameters that need to have manual touch

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.