Using the SalesPipeline Template (pbit)

This template is designed to work as a reusable starting point for Sales Pipeline reporting across Busopp, Order and Invoice, using consistent datamart views and a parameter-driven connection pattern.

The template can open and run “out of the box” if default values are provided (or if you enter the parameters when prompted).


What you get in the template

The model uses the standard Sales Pipeline view pattern:

  • core_details (anchor / header)
  • meta_codes (context and slicers)
  • meta_dates (lifecycle timing)
  • item_values_lines / item_values (numeric values)
  • optional: meta_values (aggregated values derived from item_values)

It also follows the long-thin pattern (META_TYPE + ATTRIBUTE) and creates combined fields like CODE_ATTRIBUTE to support shaping/pivoting.


First-time setup steps

  1. Open the PBIT
  2. When prompted, enter parameter values (or accept the defaults, if provided by the template logic)
  3. Click Apply
  4. Refresh the model
  5. Confirm the report shows data

If you see an authentication error, it’s almost always the token / permissions, not the report.


Parameters and suggested default values

These are the parameters visible in your model. The “Suggested default” column is what makes the template run straight away for a typical demo/dev setup.

Datamart connection parameters

ParameterWhat it controlsSuggested default valueNotes
DataMart_HostSQL host namebmt-dwh-uks-syn-dev-ondemand.sql.azuresynapse.netEnvironment-specific (dev/test/prod)
DataMart_EndpointDatabase / endpointdwh_silverLikely stable per environment
DataMart_TokenAccess token passed into get.myView<your report token>Use a placeholder (e.g. DEMO_SALES REPORT)

Domain / view selection parameters

ParameterWhat it controlsSuggested default valueNotes
param_DataMartWhich domain you are loadingbusopp Pick one domain as the “starter”
param_ValueTypeVersion of values view (used as @version for item_values)betaAlign with your published view versions

Optional “view mart” parameters (used for dynamic selection)

ParameterWhat it controlsSuggested default valueNotes
param_DateThe Date value displayed on the chart x-axisPROPOSAL_ESTIMATED_SIGNWorks well for Busopp examples
param_DisplayValueThe chart y-axisTOTAL_VALUE_BASESafe and intuitive starter metric
param_Slicer1The first filter by value (category)PROGRAMME_DELIVERYRemember these are the META_TYPE + ATTRIBUTE pattern
param_Slicer2The second filter by value (category)LINK_KEY_CUSTOMER_IDRemember these are the META_TYPE + ATTRIBUTE pattern

If you want the template to “just work” for Orders by default, you’d swap those to an order-appropriate date/value attribute later.


Switching domains (Busopp → Order → Invoice)

To switch the template from one domain to another:

  1. Change param_DataMart to order or invoice
  2. Refresh
  3. Update (optional) defaults:
    • param_Date
    • param_DisplayValue
    • param_ValueType (only if you use different versions)

Because the queries are modular, you shouldn’t need to rewrite transformations — just change the settings.


Common problems and fixes

  • Prompted for parameters every time
    That’s normal for PBIT. Use the “fallback defaults” pattern in Power Query if you want it to run without prompts.
  • Refresh fails / permission denied
    Usually token or data access. Confirm the token is valid and the user has rights.
  • Numbers look duplicated
    Check grain: you may be using long-thin meta tables directly without pivoting or without anchoring joins from core_details.
  • Currency looks wrong
    Ensure you’re not aggregating across _BASE and _CURR attributes.

Leave a Comment