Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Trying to figure out how to calculate current month processes.
expression:
=Sum({$<Status_Dash={'Completed'}, Month={"$(Month(addmonths(today(),-0)))"}>} Processed_Dash)
the return value should be 4342, but it is returning all data from "completed" in the database, including previous months.
You cannot use functions on the right hand side of the set modifier.... you will need to create Month field in the script
Month(Date_Dash) as Month
and then use this field in your set analysis
=Sum({$<Status_Dash={'Completed'}, Month= {"$(=Month(Today()))"}>} Processed_Dash)
I am not sure why Month involved here, you could use this to achieve
Sum({<Status_Dash = {'Completed'}>} Processed_Dash)
From your expression, Synthetically this?
=Sum({$<Status_Dash={'Completed'}, Month={"$(=Month(addmonths(today(),-0)))"}>} Processed_Dash)
OR
=Sum({$<Status_Dash={'Completed'}, Month={'$(=Month(today()))'}>} Processed_Dash)
Because this is just a snapshot of this months data. There is previous data in the database as well.
I've tried both of those and they both return everything 'completed' from the database.
How is your Month field created in the script?
My first expression will return 4342, Only. Aren't you?
May be this
=Sum({$<Status_Dash={'Completed'}, Month = {"$(=Month(Today()))"}>} Processed_Dash)
Where Month is created in the script like this
Month(Date_Dash) as Month
Can you try:
sum({<Status_Dash={'Completed'},Date_Dash={">=Date(MonthStart(Today(1))) <=Date_Dash(MonthEnd(Today(1))"}>}Processed_Dash)
Use this one. I had an incorrect field in the first one:
sum({<Status_Dash={'Completed'},Date_Dash={">=Date(MonthStart(Today(1))) <=Date(MonthEnd(Today(1))"}>}Processed_Dash)
Hmmm, I tried this and still returns all of the collected data. Not just this month.