Models in Stories

When you import a data file into a new story, a “private” or “embedded” model is created in the background, containing your data and dimension information.

Unlike models created on the Models page, these private models are saved with the stories, and they don't appear in the public models list on the Models page.

Preparing Data for a Model in a Story

When you initially acquire raw data, it may need to be cleansed, and it may include many rows and columns which might not be relevant to your analysis or planning. Data preparation involves pruning, transforming, and formatting your raw data before it's used in charts and tables.

Data preparation involves any of the following tasks:

  • Fixing anomalies in the data (such as dates with inconsistent formatting), filling in empty cells, and so on.
  • Filtering data, hiding columns, or splitting columns into two.
  • Assigning dimension types or measures to the data columns, or setting columns to be dimension attributes.
  • Mapping incoming data to existing dimensions, or mapping incoming numerical data to measures.
  • Updating an acquired dataset by importing data or combining data from another source.

    For a detailed information on the basic preparing data experience see Combine Data with Your Acquired Data.

Refreshing a Model in a Story

You can refresh a private model inside a story by uploading another file. The contents of the uploaded file either replace, or are appended to, the existing content in the model. Follow these steps to refresh a model in a story:

  1. With a story open in Data view (), select (Refresh Data).
  2. Choose a source file.
  3. Choose whether the new data will replace, or be appended to the existing data.
  4. Select Finish.

Publishing a Model in a Story

You can publish a model in a story to create a new public model based on the information in the private model. Reasons for publishing a private model include:

  • If you want a public model that uses the same file and the same column settings as an existing private model, you don't need to create that public model from scratch.
  • You may no longer have the original uploaded file, and therefore wouldn't be able to create a public model using that file.

Follow these steps to publish a model in a story:

  1. With a story open in Data view (), select (Publish Model).
  2. Type a model name, and a description (optional).
  3. Select Create.

A new public model, independent of the original private model, is created, and appears in the public models list on the Models page.

The original private model remains unchanged, and the story that contains it does not reference the new public model.

Note

There may be differences between the public model and the original private model in the story:

  • The dimension member IDs of a dimension in the public model can be different from the IDs in the corresponding dimension in the model inside the story. If you create a formula in the story that references dimension member IDs, the equivalent formula in the public model may refer to different dimension member IDs. However, in charts, both models will show the same dimension member values when you choose to display member descriptions instead of member IDs (dimension description is the default option for charts).
  • Models in stories can have simple date dimensions (with drill down not enabled). After publishing, the corresponding dimensions in the public model would have dimension members represented as strings.

Replacing a Model in a Story

You can now replace any acquired model in your story with another compatible acquired model (replacing the classic account models with the New Model type is not supported). When you replace the model in your story, the configuration of all the widgets in your story is preserved. This means there's no need to rebuild your charts and tables.
Note
When a model is replaced in a story, there will be issues using the Member Selector for input controls.
Note
Model replacement uses identifiers for mapping both columns and dimension. Make sure the source and the target identifiers are the same. In some instances the IDs might be truncated and cause the model replacement to fail. To avoid truncation of IDs do not use the following for dimension or measure names:
  • Names that contain more than 22 characters.
  • Names that start with a number.
  • Names that contain special characters.

Your target model doesn't have to be the same model type (planning or analytic) as the original model in your story. You can replace an analytic account model in your story with a planning model, and vice versa. Your new model must contain all the measures and dimensions, and the same measure and dimension names and types as your original model. However, your new model can also contain additional measures and dimensions not found in the original model.

Follow these steps to replace a model in a story:
  1. Open a story in Data view ().
  2. Select beside your current model name.
  3. Select to open the Select Model dialog.
  4. In the (Search) field, type the name of the new model with which you'd like to replace your current model, and select it from the list.
    Note
    Models identified as not compatible will be hidden and not displayed in the Select Model dialog.
  5. A Replace Model dialog appears informing you about the potential differences in your story after replacing the model. Select OK.
  6. Your model is now replaced.
  7. Select (Save) to save your story based on the new model.
Note
  • It is currently not possible to replace the classic account type model with the newer New Model Type and vice versa.
  • If you want to base your Smart Discovery results on your new model, you need to run Smart Discovery again, from the same story.

  • If you replace a model using the R visualization widget, the original model name persists. Only the model ID is replaced.