1

Median with SQL Server direct query

How can I get the median for a measure with a SQL Server data source using direct query?  Median is not in the list of aggregate functions for a measure.  If I try to create a formulate using Median, I get the error "The aggregation MEDIAN is not supported in data source of type SqlServer".  It is available as a context calculation but I need it to be calculated at the model level.  

1 reply

null
    • VP Product Management
    • Ian_Macdonald
    • 6 days ago
    • Reported - view

    Hi 

    Quick method, right click on the Measure concerned and select Create Measure --> Aggregate --.> Median

    This will create a new Measure, Median, that you can use with any dimension / attribute you choose:

    Using this quick method, the Measure will only be available for this Discover. To reuse it across other Discovers and make it available to other users, make it shareable by right clicking on Median and choose Share, to save to  a shared location accessible to others;

    Alternatively, to create a shared Median Measure directly, create a Formulate calculation using the Aggregate Median function, using the Measure required:

    Save it to  a shared location for use by others.

    Hope that helps.

    Ian

Content aside

  • Status Answered
  • 1 Likes
  • 6 days agoLast active
  • 1Replies
  • 17Views
  • 3 Following