Can If-Then Logic be used in Confluence tables?
Asked by Josh Gilbert:

We're using Confluence to communicate test results between group members. If a numerical value below a certain threshold (i.e. \<1) is entered in Column A, then Column B should automatically register this and "FAIL" should appear in that column (if \>=1, then "PASS", etc).

Is this sort of logic creation possible in Confluence data tables?


Answers:
author: Katerina Rudkovskaya [Stiltsoft]
body: Hi guys,  

I've just come across this old question, so for other community members who may be interested in the topic let me mention our app -- [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosti[?]mpaign=table-filter-traffic-sources&utm_vendorID=1216111).  
The described case can be achieved with the help of the [Table Transformer](https://docs.stiltsoft.com/display/TFAC/How+to+use+Table+Transformer+macro?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro. The macro allows you to scan the required column and set different values (statuses, text) based on the cells' contents into another column. You may [check here](https://docs.stiltsoft.com/display/TFAC/Custom+Transformation+-+use+cases+with+advanced+SQL+queries#CustomTransformationus[?]es&utm_vendorID=1216111) for an example.  

Furthermore, your table can be filtered by this newly created column with statuses with the help of the [Table Filter](https://docs.stiltsoft.com/display/TFAC/How+to+use+Table+Filter+macro?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro.  

Besides, you may also try the [Table Spreadsheet](https://docs.stiltsoft.com/display/TFAC/How+to+use+Table+Spreadsheet+macro?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro to get even more Excel-like functionality in Confluence.  

Our team will be happy to organize a live demo for you -- please book a suitable time slot [here](https://calendly.com/tablefilter/live-demo?month=2022-11) and invite your colleagues.


author: CelesteCS
body: Hello!

For any calculations in Confluence, including any manipulations with table data, you may use [CelesteCS Math for Confluence](https://marketplace.atlassian.com/plugins/com.celestecs.confluence.celestecs-math).

It supports logical functions, such as IF, SWITCH, AND, OR and other.

There is a plenty of other functions in the macro, so you may perform any calculations using formulas in EXCEL style.

Thanks!


author: Davin Studer
body: There are a couple of commercial add-ons in the marketplace that will give you spreadsheet-ish functionality and could achieve this. You could also embed a Google Spreadsheet and get much of that functionality for free. But if you don't want that data on Google's servers then that may not be an option.

<https://marketplace.atlassian.com/plugins/com.playsql.playsql-plugin>

<https://marketplace.atlassian.com/plugins/com.valiantys.spreadsheets>


author: Bob Swift (personal)
body: Create a user macro and put your logic in there.


Tags: filter

table

table-filter

table-filter-and-charts

table-transformer