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
王小飞
Frequent Visitor

try otherwise ,It looks like the result is wrong

Hello,expert

Look at the simulated data, it seems otherwise not executed

 

_0-1681293776876.png

 

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @王小飞 

You need to put the try.. otherwise inside the Table.addcolumn

e.g 

 

= Table.AddColumn(#"Changed Type", "Custom", each try [AGE2] otherwise [AGE1])

 

 

Best Regards!

Yolo Zhu

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

look at my video
https://1drv.ms/v/s!AiUZ0Ws7G26RhyeGSYdbu2BYXd6s?e=vLE1Q0

try [AGE2] catch(rt)=> if rt[Message]="We couldn't convert to Number." then [AGE1] else[AGE2]

Hello,

I can not open this video。please confirm

 

 Thank you

v-xinruzhu-msft
Community Support
Community Support

Hi @王小飞 

You need to put the try.. otherwise inside the Table.addcolumn

e.g 

 

= Table.AddColumn(#"Changed Type", "Custom", each try [AGE2] otherwise [AGE1])

 

 

Best Regards!

Yolo Zhu

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.