Forum Discussion

Astroraf's avatar
Astroraf
Data Pipeline
05-21-2025
Solved

How to Dynamically update formula?

I am trying to create a formula that dynamically changes with the dashboard filter that I set. 

The formula is:

(
([Total count], [@Months in Date Range])
/
([Total count], [@Previous 12 Months])
) - 1

The Previous 12 months is the previous 12 months that I select from the dashboard filter so say the range is from 

2024-09 to 2023-10, then the previous 12 months is 2023-09 to 2022-10.

DRay Liliia_DevX do you know how to do this? 

 

  • ([Total Count], PREV(Months in Date Range],12)) Did the trick!

6 Replies

  • Astroraf's avatar
    Astroraf
    Data Pipeline

    ([Total Count], PREV(Months in Date Range],12)) Did the trick!

  • Astroraf why don't you try the already existing PASTYEAR formula?

    Should be like this: 

    (
    ([Total count])
    /
    (PASTYEAR([Total count]))
    ) - 1

  • MikeGre that would work, but then the period in question which is this year vs last year would be fixed in the formula.

    Using the Filtered Measure plugin, the dates in question, for both the numerator and denominator, will be dynamic based off of the filters selection, respectively

    • Astroraf's avatar
      Astroraf
      Data Pipeline

      The problem with this solution Ido_QBeeQ is that this only works with Elasticubes. I am working with a live model, and MikeGre , this solution sounds like it would work because even if they are picking months, they are always looking at the year range, but when applied, I get no data. Will have to look further into this.

      • Ido_QBeeQ's avatar
        Ido_QBeeQ
        ETL

        Astroraf I think it should still work, will check and let you know, happy to hear you solved your challenge!