Solution
The attached DXP file works in the following fashion:
-
The user starts at the Store KPI page. The KPI chart has Tile By axis set to "Store"
-
The user clicks/taps on a KPI tile, lets assume "City Store 3"
-
A script called ClickOnTile is triggered that sets the Tile By axis of the chart to "Department" through a Document Property called "TileBy" and also Limits the data through a Document property called "SelectedStore".
The Data limiting expression is set to:
"If("${SelectedStore}"= "All",TRUE,"${SelectedStore}"=[store])"
This means that the KPI will be tiled on the Department level instead of Store, and that data will be limited to Departments within the clicked Store.
This is how the ClickOnTile script looks. The second branch of the if/else statement is for the case when user has already clicked on a store and the tileBy axis is already set to "Department"
The script changes the KPI chart to the following view:If the user clicks the <Back link in the text area, a Script called Reset will set the TileBy document property to Store again, and will Set the SelectedStore Document property to "All":This is the Reset script:
Document.Properties["TileBy"] = "Store" Document.Properties["SelectedStore"] = "All" Document.ActivePageReference = TargetPage
-
If the user instead would click on a Tile of a Department, the ClickOnTile script is run again but now will go into the "else" branch, meaning that the user will be navigated to another page with a Table visualization and a Text Area with a <Back button that triggers the Reset script above.
-
Hope this is useful and looking forward for comments on this topic!
if Document.Properties["TileBy"] == "Store": Document.Properties["SelectedStore"] = Context.HierarchyPathValues[0] Document.Properties["TileBy"] = "Department" else: Document.Properties["SelectedDepartment"] = Context.HierarchyPathValues[0] Document.ActivePageReference = TargetPage
Attachments
Download attached zip file from resourcesstore_employee_presence_with_drill_down_spotfire_7.6.dxp_.zip
Recommended Comments
There are no comments to display.