Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi experts
I have a column that retuens 1,2,3,4,5,6, etc
I want to have a condition that if (table[column] = 1 than return alpha
if (table[column] = 2 than return beta
etc
having a little trouble to get the condition working and syntax working, any help appriciate
cheers
Solved! Go to Solution.
@Anonymous wrote:I have changed ; to , but i get below error
thanks for reply, I get an error , "Function'swtich' does not support comparing value of type text with values of type integer, consider using value or format function to convert one of the values,
how do I get around it ?
thanks
@Anonymous wrote:
@Anonymous wrote:thanks for reply, I get an error , "Function'swtich' does not support comparing value of type text with values of type integer, consider using value or format function to convert one of the values,
how do I get around it ?
You have to change your columns datatype to integer instead of text. Or you could use "1" instead as 1.
You could use SWITCH() instead of if
SWITCH(Table[Column]; 1;"Alpha" 2;"Beta" 3;etc. etc;etc)
I have changed ; to , but i get below error
thanks for reply, I get an error , "Function'swtich' does not support comparing value of type text with values of type integer, consider using value or format function to convert one of the values,
how do I get around it ?
thanks
thanks for reply, I get syntax error
@Anonymous wrote:thanks for reply, I get syntax error
the ";" I use in the code might need to be a "," in your settings.
@Anonymous wrote:thanks for reply, I get an error , "Function'swtich' does not support comparing value of type text with values of type integer, consider using value or format function to convert one of the values,
how do I get around it ?
You have to change your columns datatype to integer instead of text. Or you could use "1" instead as 1.
@Anonymous wrote:I have changed ; to , but i get below error
thanks for reply, I get an error , "Function'swtich' does not support comparing value of type text with values of type integer, consider using value or format function to convert one of the values,
how do I get around it ?
thanks
@Anonymous wrote:
@Anonymous wrote:thanks for reply, I get an error , "Function'swtich' does not support comparing value of type text with values of type integer, consider using value or format function to convert one of the values,
how do I get around it ?
You have to change your columns datatype to integer instead of text. Or you could use "1" instead as 1.
Perfect thanks
used "1"
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
101 | |
66 | |
48 | |
39 | |
34 |
User | Count |
---|---|
166 | |
112 | |
60 | |
56 | |
37 |