Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have built a graph that shows the total amount of users (blue) and the number of new users that have joined each month (red)
I calculated the number of new users each month as the gap between the total users between this and the previous month in the following way:
(RangeSum(Above( total count(distinct
{<UserBirthDate={*}>}
UserKey), 0, RowNo(total))))
-
above(RangeSum(Above( total count(distinct
{<UserBirthDate={*}>}
UserKey), 0, RowNo(total))))
this formula basically uses the calculation of the total amount of users and subtracts the total from the previous year-month dimension value.
The problem is that for example when I filter year 2022 only, as is shown in the screenshot, I get no value for the New users amount in 2022-01 because the previous month( 2021-12) does not appear in the graph, and I still wish to see this value.
Does anyone have an idea of a calculation that will show the New users measure as I wish?
Thanks
If you have a reference Date field you have to include it in your set expression, forcing to include previous month. something like this:
(RangeSum(Above( total count(distinct
{<UserBirthDate={*}>}
UserKey), 0, RowNo(total))))
-
above(RangeSum(Above( total count(distinct
{<UserBirthDate={*},MasterDate={">=$(=MonthStart(AddYears(MasterDate,-1)))<=$(=Date(Max(MasterDate))"}>}
UserKey), 0, RowNo(total))))