Forum Discussion
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:
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:
does not display anything though. Perhabs because there are duplicates?
Hope someone can help
best regards severin
Anonymous Please try this as a measure
TotalResponses = CALCULATE(SUM(MultiLkpTest[Response]),FILTER(ALL(MultiLkpTest),MultiLkpTest[Text]="Test1"))
Sample DataOutput
Anonymous
TotalResponses = CALCULATE(SUM(Response[ResponseValue]),FILTER(ALL(Question),Question[QuestionName]="Test1"))
QuestionResponseRelationshipOutput
9 Replies
- PattemManohar
Community Champion
Anonymous 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 ?
- AnonymousNot applicable
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.
- PattemManohar
Community Champion
Anonymous Please try this as a measure
TotalResponses = CALCULATE(SUM(MultiLkpTest[Response]),FILTER(ALL(MultiLkpTest),MultiLkpTest[Text]="Test1"))
Sample DataOutput
- edhans
Community Champion
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.
- AnonymousNot applicable
Thanks for reply. My tables are related by ID. There are multiple values in the 'finansiel række' collum in the question table.
- PattemManohar
Community Champion
Please post the sample test data and expected output to understand your requirement in detail