cancel
Showing results for 
Search instead for 
Did you mean: 
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
Solution Sage
Solution Sage

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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors