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
hey 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:
- Open the Sample Retail datasource and add Custom Column: Month_year column to Dimdate table as the following calculation: getyear(date) * 100 + getmonth(date)
- Import the dash file
- Review the Dashboard Formula related for Min and Max:
It's using Top/Bottom 1 to filter the Max(Month_year)
- Try to apply the same on your side
Dashboard Output:
- Red Present Min Period
- Green Present Max Period
- Total Order Revenue relate to the entire period
Please note that it's a sample use case and may not work across multiple use case
Best regards
- Open the Sample Retail datasource and add Custom Column: Month_year column to Dimdate table as the following calculation: getyear(date) * 100 + getmonth(date)