cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

¿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
Super User IV
Super User IV

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

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.

 

View solution in original post

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors