Hi @DylanM I noticed an issue when I was testing my dashboard using this. I currently have year over year insights utilizing the batch date calculation you provided me with using the extract date logic. I wanted the drop down control that contains the batch date calculation to also control the table in my dashboard. However, the table only displays a year of data at a time. So, The insights at the top of my dashboard display y-o-y, for example from 2022-2023 an my table displays data for year 2023 only. To achieve that, I added a calculated field to my table to only extract one year of data as opposed to two for my insights. now this works just fine. But when I use the state values in my table it does not filter the insights properly and give me an error message saying, “not enough data”. I suspect because the table only has a year of data as opposed to two in my insights? How do I resolve this problem?
This is how my drop down control looks like:
and it controls the insights and table.
- Insights extract 2 years; Calculation used for insight:
ifelse(
${batchdatetest} = “2017” and (extract(‘YYYY’,Date)=2016 or extract(‘YYYY’,Date)=2017),Date,
${batchdatetest} = “2018” and (extract(‘YYYY’,Date)=2017 or extract(‘YYYY’,Date)=2018),Date,
${batchdatetest} = “2019” and (extract(‘YYYY’,Date)=2018 or extract(‘YYYY’,Date)=2019),Date,
${batchdatetest} = “2020” and (extract(‘YYYY’,Date)=2019 or extract(‘YYYY’,Date)=2020),Date,
${batchdatetest} = “2021” and (extract(‘YYYY’,Date)=2020 or extract(‘YYYY’,Date)=2021),Date,
${batchdatetest} = “2022” and (extract(‘YYYY’,Date)=2021 or extract(‘YYYY’,Date)=2022),Date,
${batchdatetest} = “2023” and (extract(‘YYYY’,Date)=2022 or extract(‘YYYY’,Date)=2023),Date,
NULL
)
- Table extracts 1 year; Calculation used for table:
ifelse(
${batchdatetest} = “2016” and (extract(‘YYYY’,Date)=2016),Date,
${batchdatetest} = “2017” and (extract(‘YYYY’,Date)=2017),Date,
${batchdatetest} = “2018” and (extract(‘YYYY’,Date)=2018),Date,
${batchdatetest} = “2019” and (extract(‘YYYY’,Date)=2019),Date,
${batchdatetest} = “2020” and (extract(‘YYYY’,Date)=2020),Date,
${batchdatetest} = “2021” and (extract(‘YYYY’,Date)=2021),Date,
${batchdatetest} = “2022” and (extract(‘YYYY’,Date)=2022),Date,
${batchdatetest} = “2023” and (extract(‘YYYY’,Date)=2023),Date,
NULL
)