Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
94veiga
Helper II
Helper II

¿Alguien me puede decir por qué esta mal esta función?

Descuento CP = SWITCH(TRUE(),
'Facturas + CN'[IdTipoLiq] = "CP" & 'Facturas + CN'[Año Factura] = "2019", 0.9,
'Facturas + CN'[IdTipoLiq] = "CP" & 'Facturas + CN'[Año Factura] = "2020", 0.9,
'Facturas + CN'[IdTipoLiq] = "CP" & 'Facturas + CN'[Año Factura] = "2018", 0.7,
'Facturas + CN'[IdTipoLiq] = "CP" & 'Facturas + CN'[Año Factura] = "2017", 0.7,
1)
1 ACCEPTED SOLUTION

Hi @94veiga ,

 

Your formula uses the wrong operator "&&".

v-lionel-msft_0-1604041348161.png

 

Best regards,
Lionel Chen

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
amitchandak
Super User
Super User

@94veiga , seems fine a new column. What is the issue you are getting.

It gives me this error:

DAX comparison operations do not support comparison values of type True/False with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.

Thanks a lot!

Hi @94veiga ,

 

Your formula uses the wrong operator "&&".

v-lionel-msft_0-1604041348161.png

 

Best regards,
Lionel Chen

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

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.