Forum Discussion
IF Number Ends With
I have a number field with different data:
1.00
1.14
2.00
1.01
I want to write a formula that states if the number ends with .00 then "Parent", if not then "Child"
My formula below is only returning child. I am guessing it does not like the ".00" with the numbers above.
Parent = IF(RIGHT('DataReader vSalesMaster'[SalesOrderLine], 3)=".00",
"Parent", "Child")
- How about this instead:
Parent =
IF ( 'DataReader vSalesMaster'[SalesOrderLine] = TRUNC( 'DataReader vSalesMaster'[SalesOrderLine]), "Parent", "Child") Hi,
Try this calculated column formula
=IF(MOD('DataReader vSalesMaster'[SalesOrderLine],1)=0,"Parent", "Child")
5 Replies
- OwenAugerSuper UserHow about this instead:
Parent =
IF ( 'DataReader vSalesMaster'[SalesOrderLine] = TRUNC( 'DataReader vSalesMaster'[SalesOrderLine]), "Parent", "Child") - Ashish_MathurSuper User
Hi,
Try this calculated column formula
=IF(MOD('DataReader vSalesMaster'[SalesOrderLine],1)=0,"Parent", "Child")
- v-piga-msftResident Rockstar
Hi Anonymous,
By my tests, it seems that the replies from Ashish_Mathur and OwenAuger should be right.
If you have solved your problem by the replies, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
- AnonymousNot applicable
Both solutions work great! Thank you so much!
- Ashish_MathurSuper User
You are welcome.