Forum Discussion
Anonymous
7 years agoNot applicable
DAX Lookupvalue in same table based on measure
Hi, I have a simple table called QUOTEBR with two columns "Quote" and "INDEX." There are currently 4 values in this table as follows: | Quote | INDEX | | Q1 | 1 | | Q2 | 2...
- 7 years ago
How about something like this:
Random Quote = VAR Rand = RANDBETWEEN ( 1, MAX ( QUOTEBR[Index] ) ) RETURN CALCULATE ( MAX ( QUOTEBR[Quote] ), QUOTEBR[Index] = Rand )
AkhilAshok
7 years agoSolution Sage
How about something like this:
Random Quote =
VAR Rand =
RANDBETWEEN ( 1, MAX ( QUOTEBR[Index] ) )
RETURN
CALCULATE ( MAX ( QUOTEBR[Quote] ), QUOTEBR[Index] = Rand )- Anonymous7 years agoNot applicable
AkhilAshok Thanks, I used this and it has been working for the last few days without a problem. I have to assume that the issue with my two measure way was in how the random number was being passed from one measure to the other, possibly being recaluclated in the process.