How to use if_case with expressions other than equals

How to use if_case with expressions other than equals

I'm trying to define a formula column that implements logic like this case statement would:
  1. case
  2.   when numfld1 is null then null
  3.   when numfld2 > 0 then 100*numfld2
  4.   when numfld2 < 0 then numfld2
  5.   else 0.0
  6. end
In formula columns, the docs say you need to use if_case for this sort of logic. I have no idea how to do the > 0 comparison in if_case. The dumb way if_case separates the column name from the test doesn't help. From the examples given for if_case, I would guess somehing like this:

if_case('numfld1', null, null, 'numfld2', gt(0), "numfld2"*100, 'numfld2', lt(0), "numfld2", 0.0)

That doesn't work though, because there are no formula functions like gt() and lt() as far as I can tell. Even the equals() mentioned in the documentation doesn't seem to work right.

So, what is the proper translation of this logic into an if_case formula? And where can documentation about it be found?

And, while on the topic, why does if_case not work like the if function does. Like, wouldn't if_case be better if its arguments worked the way the if() function's do? Something like:

if_case("numfld1" is null, null, "numfld2'" > 0, "numfld2"*100, "numfld2" < 0, "numfld2", 0.0)

Why doesn't if() just do that in the first place?


    • Sticky Posts

    • What’s New in Zoho Analytics – September 2025

      Hello Users!! In this month’s update, we’re raising the bar across multiple touchpoints, from how you bring in data, plan and track projects to how you design and brand your dashboards. We’ve added the all-new Gantt chart for project visualization, expanded
    • Announcing Agentic AI - Ask Zia!

      We are delighted to roll out the new agentic AI capabilities in Ask Zia, where every stage of the BI workflow is assisted by AI. With a human-in-the-loop approach, Ask Zia ensures that you’re in command of the decision, while AI handles the complexity.
    • Invitation-Based User Access in Zoho Analytics

      Hello everyone, We’re rolling out an important update on how users are added to your Zoho Analytics Organization and Workspaces. Previously, when admins added users, they were automatically added to the organization. Moving forward, to improve security
    • Zoholics Europe 2025: Your Ultimate Data Analysis (Zoho Analytics) Workshop Experience

      Why should you attend? This year, Zoholics Europe 2025 is putting data analysis centre stage. With a dedicated workshop designed to answer all your data-related questions, you’ll gain practical skills, real-time solutions, and expert insights that you
    • [Webinar] Evolving BI & Analytics in the Age of AI

      Artificial intelligence is redefining how data is collected, analyzed, and leveraged across industries. As businesses strive to become more agile and insight-driven, traditional BI and analytics must transform to meet new demands. AI-first organizations