Reply
Frequent Visitor
Posts: 6
Registered: ‎06-02-2017
Accepted Solution

DAX - Switch, True Formula - What is wrong with my code?

Hello again

 

I have an issue with the following Switch/True formular.

 

If I write only this:

Switch-True-Formular_Working.jpg

it is working

 

If I write it like this:

Switch-True-Formular_NotWorking.jpg

it is not working!

 

There error message says: The Switch-Function doesn't support comparison between True/False and Text.

Has somebody any idea what I do wrong? I found in the net a lot of example and all of them looks like my code.

Example Internet.jpg 

 

Kind Regards,

Simon

 

 


Accepted Solutions
Super User
Posts: 1,603
Registered: ‎07-03-2015

Re: DAX - Switch, True Formula - What is wrong with my code?

My guess is you have cut and paste incorrect inverted commas. Look at them in the post above, some are smart quotes and some are not. 

 

* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post


All Replies
Super User
Posts: 1,603
Registered: ‎07-03-2015

Re: DAX - Switch, True Formula - What is wrong with my code?

My guess is you have cut and paste incorrect inverted commas. Look at them in the post above, some are smart quotes and some are not. 

 

* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Highlighted
Frequent Visitor
Posts: 6
Registered: ‎06-02-2017

Re: DAX - Switch, True Formula - What is wrong with my code?

[ Edited ]

Now I see my error!

 

It should only be

 ..."30";"MDE-Laufzettel";"nicht HWZ

instead of

 ...."30"; "30";"MDE-Laufzettel";"nicht HWZ

 

Thanks a lot... Now it is working :-)