Forum Discussion
Dilbertfan
1 year agoFrequent Visitor
Compare Multiple Rows to Each Other and Lookup
Hi All. First time on posting here, so hope I get the right information. Since starting Power BI 6 months ago, this forum has been a fantastic resource, so thank you, but have searched loads for th...
- 1 year ago
Hi Dilbertfan,
The matrix solution is pretty easy to achieve.
You will need two non-related Dataset tables, two non-synched slicers and a measure like the one below.
_lookupMeasure = VAR ds1 = SELECTEDVALUE(Datasets[Name]) VAR ds2 = SELECTEDVALUE('Datasets 2'[Name]) VAR s1 = SELECTEDVALUE(Datasets[Sensitivity]) VAR s2 = SELECTEDVALUE('Datasets 2'[Sensitivity]) RETURN IF ( ds1 <> ds2, MAXX ( FILTER ( Lookup, Lookup[Dataset 1] = s1 && Lookup[Dataset 2] = s2 ), [Result] ) )Please check the Musings tab of your file modified by me.
Best Regards,
Alexander
- 1 year ago
The list solution can be achieved with the help of the same measure and specific settings in a matrix.
Best Regards,
Alexander
barritown
1 year agoSolution Sage
Hi Dilbertfan,
The matrix solution is pretty easy to achieve.
You will need two non-related Dataset tables, two non-synched slicers and a measure like the one below.
_lookupMeasure =
VAR ds1 = SELECTEDVALUE(Datasets[Name])
VAR ds2 = SELECTEDVALUE('Datasets 2'[Name])
VAR s1 = SELECTEDVALUE(Datasets[Sensitivity])
VAR s2 = SELECTEDVALUE('Datasets 2'[Sensitivity])
RETURN IF ( ds1 <> ds2,
MAXX ( FILTER ( Lookup, Lookup[Dataset 1] = s1 && Lookup[Dataset 2] = s2 ), [Result] ) )
Please check the Musings tab of your file modified by me.
Best Regards,
Alexander