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.
Hi guys,
I'm trying to retrieve a value from another column using the DAX function LOOKUPVALUE(), but I'm getting a very annoying error: A table of multiple values was supplied where a single value was expected.
I'm trying to execute the following DAX formula:
next trans name = VAR visord = [order_within_visitor] VAR visid = [visitor_id] RETURN if(visord = MAXX(FILTER('public pageview', [visitor_id] = visid), 'public pageview'[order_within_visitor]),
"Exit",
LOOKUPVALUE([page_transname], 'public pageview'[order_within_visitor], (visord+1), 'public pageview'[visitor_id], visid ))
I want to retrieve the next value of a series and put it in the "next trans name" field. I need to check if it is the last value of the series, because it should have a different behaviour when it is. If it's not the last number in the series, it should lookup the page_transname for that record and put it in the "next trans name" field.
I have something like the following datastructure (very much simplified):
visitor_id | order_within_visitor | page_transname |
0 | 1 | Home |
0 | 2 | About |
0 | 3 | Search |
1 | 1 | Home |
1 | 2 | Detail |
Does someone know what the problem might be?
Thanks!
Solved! Go to Solution.
Tackled the problem! Happens to be that there are 2 duplicate values in my dataset of 100,000 records... Didn't see that!
Tackled the problem! Happens to be that there are 2 duplicate values in my dataset of 100,000 records... Didn't see that!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
104 | |
87 | |
73 | |
66 |
User | Count |
---|---|
122 | |
112 | |
98 | |
79 | |
72 |