Forum Discussion
Contains
Thank you ibarrau for spending time with this.
Did you check the sample file? Heres what I´m Trying to do.
Test =
VAR currArbitro = SELECTEDVALUE(Table1[Arbitro])
VAR T1 =
DISTINCT(
SELECTCOLUMNS(
CALCULATETABLE(
Table1,
Table1[Rodada]>= 12 &&
Table1[Rodada]<=13
),
"Arbitro", Table1[Arbitro]
)
)
VAR T2 = DISTINCT(Arbitros[Arbitro])
RETURN
CONTAINS(t1,[Arbitro],currArbitro)Can you acomplish in the sample file? Thank you in advance
I tried to open the file but the link required permission to access.
The second post you are clarifying the return and it looks like a calculated column. If you want a calculated column just add the "IF" code from my previous post and ignore the rest. The if code is the exact calculated column. Like this
IF( 'Phisical'[name] IN VALUES ( 'Virtual'[name] ), "True", "False" )
Hope this help
- ibarrau6 years agoSuper User
Here is my answer
https://github.com/ibarrau/PowerBi-code/blob/master/PowerBi%20Reports/Contains.pbix
I have created two columns, one asking if 'customer'[customerkey] is in internetsales and another one asking if 'customer'[customerkey] is in results.
Hope this helps you can download the file from github. I will delete the file and copy the code here if it is solved for you.
- Fcoatis6 years agoPost Patron
Thank you ibarrau ,
But I cant create relationships. My data model is more complex than the sample. The problem I cant reference a variable inside
VAR currArbitro = SELECTEDVALUE(Table1[Arbitro])
IF( 'Phisical'[name] IN VALUES ( currArbitro ), "True", "False" )Thats why I´d apprecite if could take a look in the file
Thank you so much for your time