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
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
JustJan
Responsive Resident
Responsive Resident

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
JustJan
Responsive Resident
Responsive Resident

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
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.

Top Solution Authors