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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
juliaellershaw
Frequent Visitor

Look up value within a table

I’m trying to create a column that looks up the value in another row within a table. This is what my data looks like:

Question Number

Username

Answered

Timepoint

1

ID1

2

A

1

ID1

4

B

1

ID1

6

C

2

ID2

3

A

2

ID2

4

B

2

ID2

7

C

 

What I need is for a new column called Answered_A that pulls in the Answered value at timepoint A for each Unsername. It should look like this:

Question Number

Username

Answered

Timepoint

Timepoint_A

1

ID1

2

A

2

1

ID1

4

B

2

1

ID1

6

C

2

2

ID2

3

A

3

2

ID2

4

B

3

2

ID2

7

C

3

 

I’ve tried merging the table with itself, but I end up with all the values from Answered in the new column. I've also tried Lookupvalue but I can't get it to work.

 

Is there a DAX code that will do this?

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Please try this DAX calculated column expression

 

Timepoint A =
CALCULATE (
    MIN ( Table[Answered] ),
    ALLEXCEPT ( Table, Table[Question Number], Table[User Name] ),
    Table[Timepoint] = "A"
)

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
juliaellershaw
Frequent Visitor

That worked, thanks! 

mahoneypat
Microsoft Employee
Microsoft Employee

Please try this DAX calculated column expression

 

Timepoint A =
CALCULATE (
    MIN ( Table[Answered] ),
    ALLEXCEPT ( Table, Table[Question Number], Table[User Name] ),
    Table[Timepoint] = "A"
)

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors