cancel
Showing results for 
Search instead for 
Did you mean: 

PREV query getting error

amelia
10 - ETL
10 - ETL

Hi Sisense community, 

My goal here is to calculate the total number of subscriptions churned between the current week and the last 4 weeks. However, I am getting an error that says there is an issue querying the data model - would anyone be able to advise? 

2 ACCEPTED SOLUTIONS

harikm007
13 - Data Warehouse
13 - Data Warehouse

Hi @amelia ,

Please try advanced filter as below:

harikm007_0-1653557582913.png

-Hari

 

View solution in original post

harikm007
13 - Data Warehouse
13 - Data Warehouse

Hi @amelia ,

Not sure why RANGE function is not working. Please try below formula instead (sum up values of 4 weeks).

([Total Subscription churned], PREV([Weeks in Date of Joining], 0)) + 
([Total Subscription churned], PREV([Weeks in Date of Joining], 1)) + 
([Total Subscription churned], PREV([Weeks in Date of Joining], 2)) + 
([Total Subscription churned], PREV([Weeks in Date of Joining], 3))

-Hari

 

View solution in original post

4 REPLIES 4

harikm007
13 - Data Warehouse
13 - Data Warehouse

Hi @amelia ,

Please try advanced filter as below:

harikm007_0-1653557582913.png

-Hari

 

Hi Hakim, thanks for the reply! However, when I do this, I do not get a rolling 4 weeks, and only get the last 4 weeks from the most current date. Is there a way to get a rolling 4 weeks based on the current week that I am looking at instead? Thank you 😄

 

harikm007
13 - Data Warehouse
13 - Data Warehouse

Hi @amelia ,

Not sure why RANGE function is not working. Please try below formula instead (sum up values of 4 weeks).

([Total Subscription churned], PREV([Weeks in Date of Joining], 0)) + 
([Total Subscription churned], PREV([Weeks in Date of Joining], 1)) + 
([Total Subscription churned], PREV([Weeks in Date of Joining], 2)) + 
([Total Subscription churned], PREV([Weeks in Date of Joining], 3))

-Hari

 

Nice, this works! Thanks so much for your kind help Hari!!