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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Severindj
Frequent Visitor

lookup value bytext in another table

dear forum 

I'm seeking to return 'Svar' number by a text measure in another table. 

The data looks like this: power bi forum 2.JPG
power bi forum.JPG

I want to find values in response collum when the the textvalue is "Omsætning i t.kr." in the 'finansiel række' collum in the question table.

  preferably it can be made as a measure. 

been trying the lookupfuction: 

Omsætning = LOOKUPVALUE(Response[Svar];Question[Finansiel række];"Omsætning i t.kr.")

does not display anything though. Perhabs because there are duplicates?


Hope someone can help

best regards severin

2 ACCEPTED SOLUTIONS

@Severindj Please try this as a measure

 

TotalResponses = CALCULATE(SUM(MultiLkpTest[Response]),FILTER(ALL(MultiLkpTest),MultiLkpTest[Text]="Test1"))

Sample DataSample DataOutputOutput





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

Proud to be a PBI Community Champion




View solution in original post

@Severindj 

 

TotalResponses = CALCULATE(SUM(Response[ResponseValue]),FILTER(ALL(Question),Question[QuestionName]="Test1"))

QuestionQuestionResponseResponseRelationshipRelationshipOutputOutput





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

Proud to be a PBI Community Champion




View solution in original post

9 REPLIES 9
edhans
Super User
Super User

LOOKUPVALUE() will return an error if there are multiple records found where the the results column has different values. Your tables also need to be related.

 

See the documentation with an example. 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Thanks for reply. My tables are related by ID. There are multiple values in the 'finansiel række' collum  in the question table. 

Please post the sample test data and expected output to understand your requirement in detail




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

Proud to be a PBI Community Champion




Hopefully this makes sense. 

There are probably question dublicates, and therefore I need to sum them all up. they are related through id. 
power bi forum 3.JPG

@Severindj 

 

TotalResponses = CALCULATE(SUM(Response[ResponseValue]),FILTER(ALL(Question),Question[QuestionName]="Test1"))

QuestionQuestionResponseResponseRelationshipRelationshipOutputOutput





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

Proud to be a PBI Community Champion




PattemManohar
Community Champion
Community Champion

@Severindj  Are you trying as a calculated column or measure ? Also, if there are multiple responses for that particular question then what you want to do ?





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

Proud to be a PBI Community Champion




Dear @PattemManohar I'm trying as a measure. If there are multiple responses, which I know there is, I want to sum them all up. Hopefully it's understandable. 

@Severindj Please try this as a measure

 

TotalResponses = CALCULATE(SUM(MultiLkpTest[Response]),FILTER(ALL(MultiLkpTest),MultiLkpTest[Text]="Test1"))

Sample DataSample DataOutputOutput





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

Proud to be a PBI Community Champion




It worked @PattemManohar ! Thank you so much, you're a star!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors