'Median' measurement made in TARGIT Data Model Editor doesn't work


In TARGIT Data Model Editor I've added a measure to be expressed in aggregate type median. When I try using the measurement on frontend I get an error saying that 'median' is not a recognized built-in function name.


Does anybody know what I might be doing wrong?



  • Niels Thomsen Do you know about the issue mentioned? 

  • Hi Yakup

    I've tried to make a median with the data model editor and it worked fine. 

    The properties of my measure looks like this - does your properties look the same?

  • Thank you for fast response.

    Yes, they are identical.

    I get the following error on the client when I make a table to show the median number of kids:

  • Ok - I've tried to make mine fail, but I cannot. 

    I guess you are on the 2022 version of TARGIT like me?

    What if you change the aggregate type to MAX or SUM or some of the other aggregation types  - just as an experiment? Does that fail also?

  • Yes, it's version 2022 update 4.

    I tried AVERAGE and it worked perfectly.

  • Ok - my example was based on an InMemory database where it worked perfectly, while as soon as I used a SQL Relational database (which I guess is what you are doing) I got the error message exactly like the one you got.

    It seems like it's a bug - maybe as a workaround you can use the median calculation in the TARGIT Client instead?

  • That explains why, because I am using a SQL relational database also.


    I can unfortunately not calculate the median in the Client because i need to calculate it horizontally which is not possible in the Client. I want to show the development of the median over a period.


Please sign in to leave a comment.

Didn't find what you were looking for?

New post