Skip to main content
Question

If formula that returns text

  • February 4, 2026
  • 3 replies
  • 30 views

Hello, 

 

I want to create an if formula that returns text instead of a number, like this: 

if(a=1, “Phase 1”, “Phase 2”)

 

When I try I get an error message but I’m not sure if it’s because it’s not possible or just the writing nomenclature. 

 

Thanks! 

3 replies

Natasha Neese
Employee
Forum|alt.badge.img

Hello ​@esfarresgu,

 

Great question! Unfortunately, TrendMiner formulas work exclusively with numerical values and don't support text strings as return values. That's why you're getting an error with your formula.

The workaround:

Use numerical codes instead of text to represent your phases:

if(a=1, 1, 2)

For visualization and interpretation:

  • Display the numerical values (1, 2, 3, etc.) in your TrendMiner charts
  • Create a legend or documentation explaining your codes (e.g., 1 = Phase 1, 2 = Phase 2) → In the formula description or as a text tile on a dashboard

Alternative approach:

  • Use TrendMiner's context items to track and label different operational phases

Hope this helps! Let me know if you have any other questions.

 

Best regards,

Natasha


  • Author
  • Explorer
  • February 4, 2026

Hello ​@Natasha Neese,

 

I see... thanks for the answer! 

I’ll try with one of the workarounds for now but I think this would be a feature that would be good to develop at some point.

It would help to be able to bring more clarity and a more direct workflow in situations that you want to communicate information to the operators refering to a digital tag such as a sequence. 

 

Thanks again! 

 

Guerau


Natasha Neese
Employee
Forum|alt.badge.img

If you share it in our Product Ideas, our development team will take another closer look at the issue!