Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear Community,
I struggle with a code for days now. I have 4 columns in 1 table:
1. TIMESTAMP what is date/time type
2. QUESTIONID what is text type
3. ANSWER what is text type
4. SESSIONID what is text type
I would like to create a new column what contains a value from ANSWER column but only
- where the questionID is "14327",
- and I want to use this ANSWER value to every other row where SESSIONID is the same.
- Also It can happen that for the same sessionID there is more row what contain the mentioned questionid. In this case I want to use the answer where the TIMESTAMP is lower.
I used this code:
I got the following error message: "Function LOOKUPVALUE expects a column reference as argument number 1." and also at the last line GroupedTable is underlined and if i move curson uppon it it write "Parameter is not the correct type
I tried many thing and modify the formula but just cannot find a solution.
Can anyone help what can be the problem or give suggestion for code modification?
Really thanks for help in advance!
Solved! Go to Solution.
@PeterS , first argument is return value
like
LOOKUPVALUE(GroupedTable[SESSIONID], "AnswerValue", [Answer])
refer how can you get
refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8
within table, you can use the earlier
Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=17820s
@PeterS , first argument is return value
like
LOOKUPVALUE(GroupedTable[SESSIONID], "AnswerValue", [Answer])
refer how can you get
refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8
within table, you can use the earlier
Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=17820s
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |