Forum Discussion

cjakerle's avatar
cjakerle
Cloud Apps
07-05-2024
Solved

How to calculate a cumulative unique count

This is a little tricky to explain.  It's not just a running SUM from month to month.  What we are trying to do is count the number of patients seen in a month, and show how that accumulates over tim...
  • cjakerle's avatar
    07-11-2024

    David,

    Thanks so much for the thoughts.  We do have a fiscal year in the data model.  When I attempt to use a version of this query (modified for our data model) in the cube as a custom table, the OVER and PARTITION keywords don't appear to be recognized by Sisense (L2023.11) ... they don't turn purple like the words SELECT, FROM, JOIN, ON, ORDER BY, etc do and it gives a syntax error after the "OVER".  I can add this to the database instead of the cube and then pull in a table so it's not essential that this work in the cube, but I wanted to double check if you thought those window function keywords should work in L2023.11 for a custom table?

    I'm not sure the SQL is quite working for this case, but I think you've confirmed that there's no way to do this in a dashboard and I should try to SQL my way through this.  That is actually a sufficient answer so I'll be all set once I know about those window functions being recognized (or not) in the custom tables.

    Thanks!
    Chris