Dynamic Function Wizard
The Dynamic Function Wizard is used to construct expressions that drive dynamic assets like text, place holders, custom tooltips, and infographics. These assets can be configured in Discover, Illustrate, Present, and Publish.
These dynamic assets are user-defined data-driven items that are linked to a visual.
The Dynamic Function Wizard features a point-and-click interface, to easily select configure dynamic PQL or MDX expressions to obtain and display the required information.
Opening the Wizard
The Dynamic Function Wizard is a component of several wizards found in Discover, Present, Publish, and Illustrate:
- Dynamic Text: access the Dynamic Text panel from Illustrate, Present, and Publish.
- Dynamic Place Holders: access the Dynamic Place Holder panel from Illustrate, Present, and Publish.
- Dynamic Tooltips: the Tooltip Designer includes dynamic text and place holder functionality. It is available from Illustrate and Present through the Images right-click context menu.
- Dynamic Infographics: dynamic infographics can be constructed in Illustrate and may be based on user-defined dynamic expressions.
- Actions: the Action Panel can be opened from Discover, Present, and Publish; both the Execute JavaScript and Jump to URL action types expose the Dynamic Functions Editor, as do Advanced Slicer Actions.
- Triggered Launch: configured via the Create Query Condition dialog in Publish (for report, page, and scheduling triggers) and Alerts scheduling (from Discover and Present).
Creating a Dynamic Function
The content tree is exposed in the following dynamic function wizards: Dynamic Text, Tooltip Designer, Dynamic Infographics, and Create Query Condition. You must select a grid from the content tree; select the relevant grid cells to inject values into the given PQL or MDX expressions.
The Dynamic Place Holder and Actions panels do not require you to define a grid-selection for the expression, so the content tree is not exposed.
Navigate the Common and Dynamic functions libraries exposed in the wizard to find and select the required expressions; simply double-click on and expression to add it to the Formula window.
From the Dynamic Text Editor:
- Open the Content drop-down (orange highlight below) and select the required grid that will be queried.
- Write your dynamic text expression in the script editor (red highlight).
- Use the PQL Functions library (yellow highlight) to add SQL expressions to your script.
- Select the relevant cells from the grid (purple highlight) to populate the given PQL expressions.
PQL Functions
The Pyramid Query Language or PQL (pronounced 'Prequel') is a language built into Pyramid's PYRANA engine to allow users to construct queries that can run against the many SQL data stacks that Pyramid can query natively. PQL includes a vast array of operations and functions that allows users to query data and build analytical logic.
The Dynamic Text Editor exposes Dynamic and Common functions. Dynamic functions are a set of specialized method that are designed to act on a given query 's result set. Common functions are a set of methods that are found in most programmatic and mathematical function libraries. These functions are used to perform logic on basic data without concern for data structures, context, or even source.
To add a PQL function from the library to the script editor, simply double-click on it. You will then need to inject values into the function.
Adding AI-Driven PQL Function
Pyramid's LLM integration enables you to use AI to generate scripts and images, dynamic text and infographics, calculations and lists, schedules, colors, and more. This allows you to generate a range of content, including complex code, by simply providing a text prompt.
Use the AI-driven PQL function (from the Common PQL functions) to generate dynamic text. While this function cannot tell you about your data set, it can add additional information and background to your presentation. You can also use your data to drive the results generated through the LLMs by creating interactions between visualizations and/ or slicers, and the dynamic text where the LLM PQL function is injected.
Warning: AI-generated assets are generated from public domain algorithms, which can produce both erroneous and inconsistent or random results. Use at your own risk.
Examples
In this example, an interaction was added from the Country slicer to both the Map visualization and the dynamic text, driven by the ChatGPT function. The result is that both the visual and the dynamic text are simultaneously filtered by the same slicer, so that the dynamic text presents a description based on the given country.
The dynamic text is written against a simple grid containing the same country hierarchy that comprises the slicer.
The expression entered in the script window (purple highlight below) is as follows:
ChatGPT("what cuisine is " + label(1,0,0) + " famous for.")
When the slicer is applied at runtime, the underlying grid will be filtered to include only a single row (the country selected from the slicer). The dynamic text expression will then return a description of famous foods for the given country.
The interactions were added from the slicer to both the visual and the dynamic text:
When launched in runtime, the dynamic text, driven by the ChatGPT function, returns results for the selected slicer element: