Forum Discussion

Rumsch's avatar
Rumsch
New Member
2 years ago
Solved

Creating a variable as filter based on a sql subselect in power bi

Hey everyone, i'm comming from oracle pl/sql and i'm building a dashboard in power bi desktop. I connected an oracle db and what i need to do is to create a variable that can be used to filter unique...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Rumsch ,

     

    Sorry, so far, to my knowledge, this may not be achieveable.

    I suggest you create a slicer to manually filter the [prev].

    (1) This is my test data.  

    (2) We can create a measure.

    Flag = IF(MAX('sq1'[Id]) in VALUES('sq2'[Id]),1,0)

    (3) Place [Flag=1] on the screening of the visual object.

    You can manually select the value on the [prev] slicer, with prev=ger in the screenshot, and the table will output the ids that exist in both the sq1 and sq2 tables with prev=ger.

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.