Forum Discussion
vjnvinod
6 years agoImpactful Individual
Error using if condition
hi, i am getting the below error, can you help me?
v-yingjl
6 years agoCommunity Support
Hi vjnvinod ,
The ‘&&’ operator should not be used between two if() statements, just modify like this:
Column =
IF(
'Procurementdata'[Transaction Amount] >= 25000000,
">$25M",
IF(
'Procurementdata'[Transaction Amount] >= 10000000 &&
'Procurementdata'[Transaction Amount] < 25000000 ,
"$10M-$25M",
"<$10M"
)
)
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- vjnvinod6 years agoImpactful Individual
thank you it actually worked but its not coming in order
is it possible to show that in the below order?
.$25M at top
$10M-$25M
<$10M
- v-yingjl6 years agoCommunity Support
Hi vjnvinod ,
Based on your picture, seems to order it in a slicer, right?
Could not achieve it directly but you can create another column to mark each tag like a rank:
Column 2 = IF ( 'Procurementdata'[Column] = ">$25M", 1, IF ( 'Procurementdata'[Column] = "$10M-$25M", 2, 3 ) )Click the three dots and choose sort by column2 and sort asc
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.