cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Petter120 Frequent Visitor
Frequent Visitor

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

Re: Lookup value based on measure value

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
Super User
Super User

Re: Lookup value based on measure value

@Petter120

 

Try this MEASURE as well

 

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

 

 

 

Super User
Super User

Re: Lookup value based on measure value

@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 Datanaut !





Petter120 Frequent Visitor
Frequent Visitor

Re: Lookup value based on measure value

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