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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Petter120
Helper I
Helper I

Lookup value based on measure value

Hi im not even sure it this is possible but i give it a try

 

1. If i Have two tables (Table A and Table B)

 

Tables.JPG

 

2. It i create a table visual whit a date slicer and pick the date 2018-01-01 to 2018-01-05 the visual will display something like this.
(It vill group Name and sum number)

 

Visuals.JPG



3. To the question: Is it possible to from here to lookup value in a table based on the name and number column and display it in the visual table?

 

Match.JPG

To claryfi Visuals table is a visual and i realise that lookup value is the same value that is already in the visual, but i think you
get idea.

// Petter

 

 

 

4 REPLIES 4
PattemManohar
Community Champion
Community Champion

@Petter120 Is it something like this you are looking for ?

 

LkpNumber = LOOKUPVALUE(Test75Lkp[LkpNumber],Test75Lkp[Name],Test75Data[Name],Test75Lkp[LkpNumber],CALCULATE(SUM(Test75Data[Number]),FILTER(Test75Data,Test75Data[Name]=EARLIER(Test75Data[Name])))) 

image.png





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

Proud to be a PBI Community Champion




petrovnikitamai
Resolver V
Resolver V

i'm not sure but try this

add column in Table A

new column = 
var sumNmbr = sumx(filter(tableA;earier([Name])=[Name]&&earlier([Date])=[Date]);[Number])
var lookUpB = lookupvalue(tableB[Lookup number];tableB[Name];tableA[Name];tableB[Lookup number];sumNmbr)
return lookUpB

@Petter120

 

Try this MEASURE as well

 

Measure =
LOOKUPVALUE (
    TableB[Lookup number],
    TableB[Name], SELECTEDVALUE ( TableA[Name] ),
    TableB[Lookup number], SUM ( TableA[Number] )
)

 

 

 


Regards
Zubair

Please try my custom visuals

Measure =
LOOKUPVALUE (
    TableB[Lookup number],
    TableB[Name], SELECTEDVALUE ( TableA[Name] ),
    TableB[Lookup number], SUM ( TableA[Number] )
)

 

 

This one works great, but i just realised i was asking the question wrong.

 

What im trying to figure out is a measure that:

1. Match the name in Visual table and Table B (Lookup table)

2. And Match the number Visual table and Table B (Lookup table)

3. And Returns the corresponding  skop to visual table

 

Sorry about my ambiguity

 

Match2.JPG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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