In this example, you will learn how to design a Web box that dynamically displays images based on criteria or filters applied in your dashboard.
Use Case Example
Suppose your data warehouse contains data from multiple companies, and you want the corresponding company logo to appear dynamically depending on the selected company filter.
In this demonstration, we use the Territory dimension—with members Asia, Europe, and North America—to filter the data and display images that match the selected territory.
Preparing the Images
The images used in this example are named to match the corresponding dimension members (e.g., Asia.jpg, Europe.jpg, North America.jpg).
Ensure the filenames exactly match the dimension member names.
For the best visual result, use images that are the same size.
In this example, the images are hosted locally on localhost, but in practice, they can be hosted anywhere, as long as they are:
Accessible via a URL.
Reachable by all end-users working with the dashboards.
Setting up the Web box
Setting Up the Web Box
Specify the URL
Enter the base URL of the website hosting your images, for example:
http://localhost/TARGITImages/imagename.jpg
Note: Replace
localhostwith the server hosting your images.TARGITImagesis the alias of the virtual directory hosting the images. See instructions on setting up virtual directories on IIS below.Insert Dynamic Content
Replace
imagenamewith dynamic content by clicking the curly brackets{}.Select the dimension or filter value (in this example, the Customer Territory dimension).
Change the Range to 'Single'.
Optional: Define a Default Image
You can specify a default value - the 'No selection text' - for when no filter is selected.
If the default value matches an image in your directory, that image will be displayed when no filter has been applied.
In the dashboard, when filters are applied (e.g., selecting Europe in the Customer Territory dimension), the Web box will automatically display the corresponding image.
Making Images Accessible via URLs
As noted, the images must be accessible to end-users through a URL. This can be achieved in different ways, depending on your setup. If you already have an image server, you can host them there.
One simple option is to create a Virtual Directory in Internet Information Services (IIS). A virtual directory maps a folder on your server to a URL path, making images accessible through a structured URL such as:
http://yourserver/images/logo.jpgStep-by-step guide for enabling Virtual Directory in IIS
Open IIS Manager
Press
Win + R, typeinetmgr, and hit Enter.This opens the Internet Information Services (IIS) Manager.
Select Your Site
In the Connections pane on the left, expand your server node.
Expand Sites, then click the website where you want to add the virtual directory (e.g.,
Default Web Site).
Add a Virtual Directory
Right-click the site → choose Add Virtual Directory…
Alias: Enter a short, URL-friendly name (e.g.,
images).Physical Path: Browse to the folder on your server where the images are stored (e.g.,
C:\MyImages).
Set Permissions
After creating it, select the virtual directory in IIS.
Double-click Authentication and make sure Anonymous Authentication is enabled (so images can be accessed without login).
Right-click the folder in Windows Explorer → Properties → Security tab.
Ensure the IIS_IUSRS (or
Everyone, if acceptable) account has Read permission.
Test Access
Open a browser and go to:
http://localhost/images/myphoto.jpgReplace
imageswith your alias andmyphoto.jpgwith a file in your folder.
Comments
Please sign in to leave a comment.