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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.