The Dynamic Function Wizard is used to construct expressions to drive dynamic assets like text, place holders, custom tooltips, and infographics. These assets can be configured in Illustrate, Present, and Publish.
These dynamic assets are user-defined data-driven items that are linked to a data discovery.
Access the Dynamic Function 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 exposes dynamic text and place holder functionality. It is available from Illustrate, and from Present via the right click context menu of images.
- Dynamic Infographics:dynamic infographics can be constructed in Illustrate, and may be based on user-defined dynamic expressions.
- Triggered Launch: configured via the Create Query Condition dialog in Publish (for report, page, and scheduling triggers) and Alerts scheduling (from Discover and Present).
Navigate the Dynamic Function Wizard
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,
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.
Using the ChatGPT AI-Driven PQL Function
Pyramid's OpenAI 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 ChatGPT 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 by OpenAI's ChatGPT by creating interactions between visualizations and/ or slicers, and the dynamic text where the ChatGPT PQL function is injected.
Warning: AI-generated assets are generated from public domain algorithms, which can produce both erroneous and inconsistent/ random results. Use at your own risk.
In this example, an interaction was added from the Country slicer to both the Map visualization and the dynamic text, driven by the Chat GPT 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 Chat GPT function, returns results for the selected slicer element: