Synoptic Panel accepts a DAX measure in the Map Selector field well.
This measure should return a string consisting in the concatenation of reference values that will be associated to the maps you want to display. Internally, this string is split into individual references, using a separator character as defined in the visual settings.
For each map imported into Synoptic Panel, you can assign one of the references from the map selector using the Map Editor, or directly in the JSON file when importing multiple remote maps.
When the map selector measure returns a reference that matches one of the references assigned to the maps, the visual will display the corresponding map. If the measure returns a reference that doesn’t match any of the maps, the visual will display a warning message.
In case of multiple matching maps, the visual will also display the dropdown list to let the user switch between them.
Selector Measure
The map selector measure must be a DAX expression that returns a string. This string should contain the reference values that will be associated to the maps you want to display.
Assuming you have a table with the following columns and values:
OfficesTable | ||
---|---|---|
Office | ... | ... |
New York | ... | ... |
Seattle | ... | ... |
Chicago | ... | ... |
The map selector measure could be defined as follows:
SelectedOffices =
CONCATENATEX(
ALLSELECTED('OfficesTable'[Office]),
'OfficesTable'[Office],
"✄" // Separator character
)
In this example, the measure returns a string with the names of the offices currently selected, separated by the character ✄. Depending on your needs, you can replace the ALLSELECTED
function with others, such as VALUES
, to adjust how the map selector measure interacts with the context.
Remember to modify the table and column names according to your dataset.
IMPORTANT: The separator character must be the same as the one defined in the visual setting Map Selector Separator.
Add Default View
To visualize a default map when no selection has been made, create an artificial surrogate level directly in the map selection measure.
SelectedOffices =
VAR vSelector =
CONCATENATEX(
ALLSELECTED('OfficesTable'[Office]),
'OfficesTable'[Office],
"✄" // Separator character
)
VAR vDefaultView = "Default view"
Return
IF( ISFILTERED('OfficesTable'[Office]), vSelector, vDefaultView)
When ISFILTERED
evaluates to False, Synoptic Panel receives the text “Default view”. Then, in the Map Selector section, “Default view” will appear as any other physical value from the column.
Please note that only one reference value will be displayed in the map selector section at a time. When there is no selection made (for example, when no slicer selection is active), “Default view” will be shown. Once a selection is made, the corresponding reference value will appear in the map selector section. This change is due to the selector measure, which will display “Default view” when there are no selections, rather than showing all reference values.
Assigning References to Maps
To assign a reference to a map, follow these steps:
-
Create the map selector measure as described above.
-
Bind the measure to the Map Selector field well.
-
Load a map into Synoptic Panel, if you haven’t already.
-
Open the Map Editor by clicking the pencil button in the visual toolbar, or by clicking the Edit button, if you just imported the map.
-
In the Map Editor, choose the reference value that will be associated with the map from the dropdown list in the Map Selector section.
-
Click Save to apply the changes.
Repeat these steps for each map you want to associate with a reference.
After assigning the references, the visual will display the corresponding map when the map selector measure returns a matching reference.