Inforiver

Upcoming webinar on 'Inforiver Charts : The fastest way to deliver stories in Power BI', Aug 29th , Monday, 10.30 AM CST.    Register Now

Formula Editor Tips: Selecting the Right Variables Without Tripping Over Keywords 

by Inforiver | Oct 01, 2024 | ,

Inforiver offers powerful Excel-like functionalities, including a robust formula editor designed to enhance your report-building capabilities. Whether you're a seasoned user familiar with Inforiver’s extensive range of formulas and functions or just getting started, the intuitive interface and comprehensive product documentation make it easy to quickly make progress.  

To help ensure seamless usage and minimize potential errors, this blog post provides essential information on avoiding specific keywords when naming variables in the formula editor. Understanding these best practices will help you optimize performance and streamline your report creation process.  

Why keywords should be avoided?

Formula Functions in Inforiver are specific keywords with pre-defined meanings and functions within the system. These keywords/reserved words are essential for the internal operations of the formulas. Using them as names for custom variables or measures can cause conflicts, leading to compilation errors and unexpected behavior. 

Example 

In the example below, ‘IF,’ a keyword, is used as a variable name. Inforiver flags this as an error due to conflicts that arise during formula calculation. 

why-certain-keywords-be-avoided

Note: By default, measures are referred to with braces [] (e.g., [2023 Actuals]) and are referenced with unique keys. While this can prevent errors, the best practice is to avoid naming your measures, too, using keywords. This eliminates unnecessary ambiguity. 

JavaScript Reserved words 

JavaScript reserved words should also be avoided when naming variables. 

Examples 

Below are other examples where variables are named after JavaScript keywords – ‘var’ and ‘try’: 

java-sript-reserved-tokens
java-script-reserved-tokens-example

What are the keywords to avoid? 

Below is a sample list of Inforiver formulas and JavaScript keywords you should avoid using as variables in the formula editor: SUM, IF, AND, OR, NOT, VAR, TRUE, FALSE, NULL, TRY, CATCH, etc. 

This is not an exhaustive list. For the complete list, please refer to the product documentation and the list of JavaScript reserved words.  

Example 

Avoiding Inforiver keywords and JavaScript reserved words in the formula editor provides the correct output as below:

what-are-the-keyword-to-avoid

Best practices while naming variables  

  • Use descriptive names: Choose unique and descriptive names for your variables and measures.  
  • Leverage the suggestions: Inforiver displays reference and formula suggestions as and when you start typing in the formula editor. Use Ctrl + Space to manually open the suggestions. 
  • Check for error prompts: Notice the error messages and prompts. These messages indicate syntax and logical errors. 

Learn more and get started with Inforiver  

To learn more about the latest from Inforiver, and why we are garnering recognition from industry experts, check out our newest brochure.  

If you’re ready to level up your planning, reporting and analytics, try it for free today.


Share this on:

Get Inforiver brochure

Maximize your business potential with Inforiver's paginated reporting, data entry, planning & budgeting capabilities
Download now
Inforiver by Lumel

Inforiver helps enterprises consolidate planning, reporting & analytics on a single platform (Power BI). The no-code, self-service award-winning platform has been recognized as the industry’s best and is adopted by many Fortune 100 firms.

Inforiver is a product of Lumel, the #1 Power BI AppSource Partner. The firm serves over 3,000 customers worldwide through its portfolio of products offered under the brands Inforiver, EDITable, ValQ, and xViz.

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram