cancel
Showing results for 
Search instead for 
Did you mean: 

Sisense Dynamic period comparison: using past period

ramansingh89
9 - Travel Pro
9 - Travel Pro

Hi

We are trying to build a KPI indicator widget that will show the current value of KPI (based on user date filter) + also shows % change with 'previous period' which should be the dynamically adjusted based on user date values. for example
ramansingh89_0-1723214886328.png

  1. Custom range
    1. single date (eg: Jan 17th) → Compares to the previous date (Jan 16th in this case)
    2. particular week (Jan 1 to Jan 17th) etc.. --> to compare with same period of time prior to the start of the range (the prior 17 days in this case)
  2. Current Week --> compared with the previous week
  3. Last Week → Compared to the week prior
  4. Current Month → compared with last month
  5. Last Month → Compared to the month prior
  6. Last 3 Months --> compared with 3 months before last 3 months
  7. Last 6 Months --> compared with 6 months before last 6 months
  8. Last Year --> compared with previous year

I experiemented with 'growth' function under % change of over time. Its working as expected for few date options but not all. Example

if i select 'This month' --> it will compare against last month
if i select 'last 2 months' --> it does not work as expected. Ideally it should compare against the previous 2 months but it calculates T-1 eg: As we are August currently, Last 2 months should be compared against April and May but instead 'growth' is calculated against May and Jun. I see the same behaviour when i select any particular date range. 

Is there any solution to this?

 

 

 

 

Is this something that can be done in Sisense?

5 REPLIES 5

ramansingh89
9 - Travel Pro
9 - Travel Pro

cc @DRay 

DRay
Community Team Member
Community Team Member

Hi @ramansingh89.

There are several posts in the community with a similar question. Can you take a look at these two I found and see if they help?

https://community.sisense.com/t5/knowledge/compare-a-time-window-against-the-immediately-preceding-t...

https://community.sisense.com/t5/build-analytics/calculate-value-from-same-period-last-month/td-p/21...

 

David Raynor (DRay)

Hi @DRay 

Thank you for sharing. Unfortunately it didnt helped. One is related to Elasticube and not live models and other one is related to legacy filters 😞 

HamzaJ
12 - Data Integration
12 - Data Integration

Hey @ramansingh89 ,

Did you try to use the PREV-function?

It is not possible to insert all 8 of your requests in 1 widget (unless you use the free Advanced Indicator Card plugin from @Ravid_PaldiTeam ). However it is possible to do this in multiple indicators 

More on the prev-function can be found here: https://docs.sisense.com/main/SisenseLinux/dashboard-functions-reference.htm?tocpath=Dashboards%7CFo...

I dont know if it is exactly what you looking for, however I managed to get something similar up and running. In the screenshot below we see

- the first column is a sum based on the a date filter that the user can use (this is set to this week)

- the second column is a sum based on a static filter i set to validate the result with the first column

- the third column is a sum based on the a date filter that the user can use and calculates the week prior

- the fourth column is a sum based on a static filter i set to validate the results of the third column

I uses the prev-function and a hardcoded date-range in the other columns to validate the results and they are the same. 

HamzaJ_0-1723272363494.png

Hamza

 

DRay
Community Team Member
Community Team Member

Hello @ramansingh89,

I’m following up to see if the solution offered by @HamzaJ worked for you.

If so, please click the 'Accept as Solution' button on the appropriate post, that way other users with the same questions can find the answer. If not, please let us know so that we can continue to help.

Thank you.

David Raynor (DRay)