Remove Column from Display - Quote Template

I have created a custom quote template in hubspot. I have used line item module to display custom column which I want.
Lets say , Calculated Total Discount (hs_total_discount).
I want to display off this field if value is empty or some condition acheived. Is this possible.
Refer Image, where this field is empty , but anyways it is displaying.

Hi @SVenkatesan,

you can wrap the code which is responsible for this column in a if or unless statement like this

{% unless template_data.quote.discount == "" %} {# use the name of the used query instead of template_data... here #}
<td>
{# your code for the discount column #}
</td>
{% endunless %}

best,

Anton

Moderator note: While this solution may not address the original poster’s specific situation, it could be helpful for other community members facing similar challenges.

{% elif item.column_property == 'hs_total_discount' %}
 {% unless item.column_property == "" and item.column_property == null and item.column_property == unit.hs_pre_discount_amount and item.column_property=='0' %}
 <td style="text-align: right;padding-left: 0px;padding-right: 3px;padding-top: 20px;padding-bottom: 20px;">
 <span class="currency__content" style="text-align: right;">{{ unit[item.column_property]|format_currency(LOCALE, CURRENCY, true, true) }}</span>
 </td>
 {% endunless %}

Thanks Anton, But your solution just avoids executing my final span class or my code execution. But it doesnt OFF the column from displaying. It still displays as empty. Is my findings is right ?