Unable to use aggregates for KPI

The use case I have is compare the No. of profiles viewed up until the point in time between 2fiscal years. For eg:
Currently, the dataset has data upto 31Aug2024, When I add count(prof_id) to the KPI visual (with Year added to trend field) I want to see Data for 2023, upto 31Aug2023. I hope this makes sense
image

I’m doing as follows -

  1. Extract Month and Day from the date field
    *day=concat(ifelse(strlen(toString(extract(‘MM’, {view_dt})))<2,concat(‘0’,toString(extract(‘MM’, {view_dt}))),toString(extract(‘MM’, {view_dt}))),“/”,
    ifelse(strlen(toString(extract(‘DD’, {view_dt})))<2,concat(‘0’,toString(extract(‘DD’, {view_dt}))),toString(extract(‘DD’, {view_dt}))))
  2. Extract Max of the Month/day
    Max_Mday=lastValue(MonthDay,[MonthDay ASC])
  3. Add a filter for KPI visual where Condition=1
    Condition = ifelse(MonthDay>=‘04/01’ and MonthDay<={Max_MonthDay},1,0)

When I drag and drop the condition filter and set it to 1, it gives an error -
image

Any suggestions how to solve this?

Hi @Ops_Expert,
Please take a look at the attached Arena view; although it’s put together with sample data, the process should work the same for your case.
Unable to use aggregates for KPI

Let me know if you have any additional questions!

1 Like

Perfect! It works. Thank you so much @Brett :grinning:

2 Likes