Date range comparative analysis
I'm trying to compare the price between two dates within a date range.
Here is an example of what I am attempting:
- My date range is Jan 2024 to June 2024
- Field 1: KPI, Table Column, Field shows the average price in Jan 2024
- Field 2: KPI, Table Column, Field shows the average price in June 2024
- I change the date range to March 2024 to May 2024
- Field 1: KPI, Table Column, Field shows the average price in March 2024
- Field 2: KPI, Table Column, Field shows the average price in May 2024
Is there a way I can show this? I've tried a few different data functions within the widget function as well as filtered measure plugin.
One thing I was thinking, is it possible for the date range to auto-populate the filtered measures?
Such as:
- I duplicate the date field in the Elasticube twice. Once is for Period1Date and the other Period2Date.
- Period1Date would auto populate to be Jan 2024 and Period2Date would autopopulate to June 2024
- Then I would use these two date fields in the widget expression
HQ_Dev_Prod
Posted 1 year ago·Last reply 1 year ago
7 comments
DRay
·1 year agoHi HQ_Dev_Prod,
I’m following up to see if the solution offered by AssafHanina 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.
HQ_Dev_Prod
OP1 year agoDRay and AssafHanina
Still testing it out. I was able to duplicate the date field in the elasticube for comparative analysis and was able to use it as a filter to compare two dates, but I wasn't able to use it in a manner to auto calculate the first period vs last period in a given date range.
Example:
- Range = Jan to June
- I can see average price for this full period
- But I want to see the price in Jan and then the price in June to compare.
Assaf Hanina
·1 year agoHey HQ_Dev_Prod ,
Based on the Use case described:
Range = Jan to June: does the range require?
Since the Compare is month (Yan) to month (June), the implementation using the filter measure:
Best regards
HQ_Dev_Prod
OP1 year agoAssafHanina thank you for the detailed step by step!
I was able to successfully build it this way. However, it requires the user to manually select @Date and select @Date_Compare.
Would it be possible for the start and end date be set automatically based on the selected date range?
Such as:
This way, in one dashboard I can see total values during this time period. With a comparative analysis between Start (Jan) and End (Jun).
Assaf Hanina
·1 year ago · Editedhey HQ_Dev_Prod ,
thanks for sharing the full details.
From the understating, it's not a comparative dashboard where users can filter 2 custom range of Date filters. instead, users would like to filter on a Period meaning, Single date Filter.
Assuming using a Revenue as Metric, Users would like to see the KPI for Revenue for the entire period, and break by the Revenue for multiple Dimensions.
Additionally, users would like to be able to Review the Growth from the First Period (i.e. Jan) to the Last Period (i.e Jun) in respective to the Date filter. meaning if the range is different (Jan - March) the Growth calculation is Rev(March) / Rev(Jan)
For getting this, it's require to use a filter measure (not the plugin) to Get the Minimum and Maximum of Date according to the date Period.
Please find an example on behalf of the Sample Retail Datasource:
It's using Top/Bottom 1 to filter the Max(Month_year)
Dashboard Output:
Please note that it's a sample use case and may not work across multiple use case
Best regards
DRay
·1 year agoHello HQ_Dev_Prod,
I’m following up to see if the solution offered by AssafHanina 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.
Assaf Hanina
·1 year agohey HQ_Dev_Prod ,
the filter measure plugin allow you the option to slice the same KPI for two different date filters.
For example:
Please find the related post with an example of applying multiple date filters using the filtered measure plugin
Best regards