Skip to main content
Solved

Cognite Charts: IF/ELSE Functions for Calculations [Community Contributed]

  • June 6, 2023
  • 6 replies
  • 146 views

crgomez13
Seasoned ⭐️⭐️

On Behalf of Charts super users at Clear Lake:

I would like the ability to incorporate “If/Else” statements as a function in Charts similar to what is capable in Excel. There are some calculations that rely on certain conditional parameters to be met in order to define which mathematical approach must be taken.

Best answer by Anita Hæhre

That is great @crgomez13, thanks for confirming. We’ll close this thread for now, but feel free to reopen it anytime 🚀

6 replies

Knut Vidvei
Expert ⭐️⭐️⭐️⭐️
Forum|alt.badge.img
  • Expert ⭐️⭐️⭐️⭐️
  • June 7, 2023

Hello, Christian.

Perhaps this will help. We have a logical check function that might help here.

Perform a logical check between time series/constants and returns the assigned time series/constants when the condition holds true or false. The logical check is performed following the format: Value 1 {operator} Value 2, where the operator can be Equality (==), Inequality (!=), Greater than (>), Greater or equal than (>=), Smaller than (<) or Smaller or equal than (<=)

 

Here is an example of it being used:

 

Best regards, Knut


crgomez13
Seasoned ⭐️⭐️
  • Author
  • Seasoned ⭐️⭐️
  • June 8, 2023

Hi Knut,

I believe this might be what the users were looking for! I will follow up if there are any more questions or concerns. Thanks!


Anita Hæhre
Expert ⭐️⭐️⭐️⭐️
Forum|alt.badge.img+1
  • Head of Community
  • June 26, 2023

Hi @crgomez13 just following up to see if the above is what your users are seeking? 


crgomez13
Seasoned ⭐️⭐️
  • Author
  • Seasoned ⭐️⭐️
  • July 3, 2023

Hi Anita,

This covers what was needed by the user. Thanks


Anita Hæhre
Expert ⭐️⭐️⭐️⭐️
Forum|alt.badge.img+1
  • Head of Community
  • Answer
  • July 4, 2023

That is great @crgomez13, thanks for confirming. We’ll close this thread for now, but feel free to reopen it anytime 🚀


Dilini Fernando
Expert ⭐️⭐️⭐️⭐️
Forum|alt.badge.img+2
  • Expert ⭐️⭐️⭐️⭐️
  • July 7, 2023

Hi @crgomez13,

Thanks for all your great contributions in our community! We’ve chosen to move your article to our hub's How-To section as it will greatly benefit other members of our community. Thank you for your understanding, and we look forward to seeing more great contributions from you in the future! 

Best regards,
Dilini