Skip to main content

Working on KPI values, which would ideally show

Current month value and a percentage change between current and previous month.

 

I have ZN(SUM(field)) - LOOKUP(ZN(SUM(field)), -1)

 

This is fine if I have the Date in the columns, and will show the percentage change, but I would like my final KPI to look something like

 

CURRENT MONTH VALUE | (PERCENTAGE CHANGE) vs. PM (i.e. Mar 21)

 

If I have the month column in the rows and filter to latest date, it will show my current month value but get rid of the percentage change as it no longer has the previous month's data to source from...

2 answers
  1. Apr 20, 2021, 11:56 AM

    OK I found a way around this:

    Latest Month Value:

    IF DATEDIFF ('month',DATETRUNC('month', [Date]), {MAX(DATETRUNC('month', [Date]))})=0

    Then [field]

    END

     

    Previous Month Value:

    OK I found a way around this:

    Previous Month Value:

    IF DATEDIFF ('month',DATETRUNC('month', [Date]), {MAX(DATETRUNC('month', [Date]))})=1

    Then [field]

    END

     

    Difference:

    SUM(Latest Month Value) - SUM(Previous Month Value)

0/9000