cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
carolinapm Visitor
Visitor

Problems with switch

Hello!!

 

I have a problem with a table.

I need a measure that looks for an id of a column, in another table, and depending on the result, of one value or another. The formula is this:

=SWITCH(TRUE();[Id_bo]='252'[Id_WebAgendas];1;0)

but it gives me an error: The value of the 'Id_WebAgendas' column in table '252' cannot be determined in the current context.

el id es un numero . Es una concatenación de distintos valores para crear un id unico (fecha, numero de empleado y codigo de tarea)

 

Thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Problems with switch

Hi @carolinapm ,

 

If the two column values are in the same table and put into a table visual, you can use the following measure:

 

 

=
SWITCH (
    TRUE ();
    SELECTEDVALUE ( '252'[Id_bo] ) = SELECTEDVALUE ( '252'[Id_WebAgendas] ); 1;
    0
)

OR

 

 

=
IF (
    SELECTEDVALUE ( '252'[Id_bo] ) = SELECTEDVALUE ( '252'[Id_WebAgendas] );
    1;
    0
)

 


If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User IV
Super User IV

Re: Problems with switch

Try creating a column instead of a measure.  Use Add column option.

Community Support Team
Community Support Team

Re: Problems with switch

Hi @carolinapm ,

 

If the two column values are in the same table and put into a table visual, you can use the following measure:

 

 

=
SWITCH (
    TRUE ();
    SELECTEDVALUE ( '252'[Id_bo] ) = SELECTEDVALUE ( '252'[Id_WebAgendas] ); 1;
    0
)

OR

 

 

=
IF (
    SELECTEDVALUE ( '252'[Id_bo] ) = SELECTEDVALUE ( '252'[Id_WebAgendas] );
    1;
    0
)

 


If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Community Support Team
Community Support Team

Re: Problems with switch

Hi @carolinapm ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors