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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Dax function to show value from a different line and column

Hello everyone,

In a table,  I would like to create a new column where it will show the value of an existing column [AnswerText] if my column [AnswerCode] is equal to "A1629032" and I want this value to be written in the same line as the [QuestionCode]="Q1228101"

 

Basically, value in C3 should be written in D5 and D7 : 

capture concombre.JPG

 

Thanks in advance,

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

 

Something like this should calculate your column:

 

NewColumn = if ('Table'[QuestionCode]="Q1228101", LOOKUPVALUE('Table'[AnswerText],'Table'[AnswerCode],"A1629032"))

Jan 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

 

Something like this should calculate your column:

 

NewColumn = if ('Table'[QuestionCode]="Q1228101", LOOKUPVALUE('Table'[AnswerText],'Table'[AnswerCode],"A1629032"))

Jan 
Anonymous
Not applicable

Thank you for the answer!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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