Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I am trying to showcase numbers in a text object using Set.
Here is my expression
=({$<P_Month={"$(=Date(Addmonths(Month_Name,-1),'MMMM'))"}>}$(TPH))
now TPH is a variable. Its definition : num((($(Pro_T)+$(Qct))/$(Avt))*100,'##.00')
Again explanation of each variable is :
Pro_t: num(sum(Processing_Time)/60,'##.00')
Qct: num(sum(QC_Time)/60,'##.00')
Avt: num((sum(Attendance))*7.5*.89,'##.00')
I need to calculate the result for last month for which set is there.
I cant make it work using different logics. please assist me here to get a solution.
Regards
Sagar
Hi Anil, I found a solution and thought of sharing. I used three different variables and used them to calculate numbers using set and then did different aggregations to get the output. I hope thats correct and if you think there is any issue with it, please let me know.
What's the issue your facing ???
What are you getting when you use this alone in text box? =$(TPH)
it is showing error ')' missing
it will give result but i want to calculate for previous month also. that is why i am using set.
That is what i was over thinking the issue. Here, You need to set some thing like this
=Sum ({$<P_Month={"$(=Date(Addmonths(Month_Name,-1),'MMMM'))"}>}$(TPH))
So, Here i assume you have full month names
Hi Anil,
I tried the solution but i am getting error nested aggregation not allowed.
True, Because Sum(...Sum(...Sum())) won't allow.
Can you attach application to check
please see the attached file. there is a text object on right with error
I am thinking some thing like below Aggregations and Function Classes
Variable is
((num(Sum(Aggr(sum(Processing_Time),Month_Name))/60,'##.00') + num(Sum(Aggr(sum(QC_Time), Month_Name))/60,'##.00'))
/ num((Sum(Aggr(sum(Attendance), Month_Name)))*7.5*.89,'##.00'))*100
Expression
=Count({$<P_Month={"$(=Date(Addmonths(Month_Name,-1),'MMMM'))"}>} $(Variable))
POS - Change Month_Name to P_Month as needed
HTH
Anil