- I want to use
function while passing the DEA(a calculated field) as a parameter for measure to derive WoW, MoM,YoY etc. Is there a way to do this? I had some trouble doing this as it does not accept calculated fields and throws me an error related to Nesting of Aggregate functions. I have shared the error screenshot below, let me know if there is any workaround you know.**periodOverPeriodPercentDifference**

Hi @Tanisha_Shetty, in your function, is the {Internal_DEA} a calculated field? can you share the function of it?

Period function should support calculated field as measure, maybe some trickyness around the calculated field itself. One quick step to debugging the function is to create a calculated field for sum({Internal_DEA}) and drag into a visual with a dimension of {dt} in it, see if it works?

Hi @emilyzhu, thanks I tried that. Here is my formula for Internal_DEA:

1- (sum({dea_misses_intprms})/sum({scanned_units})). I tried creating a calculated field for sum({Internal_DEA}) but that returns a similar error as well.

sum(1-sum(xx)) will fail. Please try sumOver(1-sum(xx), [dimensions in visual])

I tried this, but it did not work as well. Returns a similar error (related to the nesting of aggregate functions) I received earlier.

Tanisha, do you mind to attach a larger screenshot? It is little bit difficult to read the message from the current screenshotâ€¦ Sorry, I am getting olderâ€¦

Hi Ying, Emily,

Want to update you that this has been resolved now. I used the function below to achieve it:

**periodOverPeriodPercentDifference({Internal_DEA},dt,MONTH,1) 10000*

Thank you for your help!