Cummulative sum/running total of distinct values

I want to use the explore to create a cumulative sum of distinct values. I am not sure how to do that in Looker UI, however the SQL I came up with looks like this:

SELECT
a.month,
(select count(distinct b.id) from raw_data b where b.month <= a.month) cumulative_no_ids
FROM raw_data a
GROUP BY a.month
ORDER BY 1 ASC



There is the option to create a calculated measure using Running total, but that takes only sum without getting distinct values resulting in too high numbers. Can I do something like this in Looker UI or in Model? 

4 0 2,210
0 REPLIES 0
Top Labels in this Space
Top Solution Authors