Forum Discussion
Creating a variable as filter based on a sql subselect in power bi
- Anonymous2 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.
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.
- Rumsch2 years agoNew Member
Hey:) thx a lot. I didn't expect an answer that fast and usefull as yours! Yes i think this will do the job. And the menu with the available slicers looks good, too. Meanwhile, since i was born with sql;) i created a column in the result table (on db) with the listagg function. So every prev and next combo is in this column as a string. Now i can use an advanced filter and type the keyword into the prompt. Not the best nor fastest solution but it works too. I implement your solution where it's possible (not too many possible keywords). Thx a lot