I am wondering how show txt that says a count of an item has increased since last month.
An exame is on a project management dashboard we have a count of tasks and i want to show underneath the count of tasks an increase over the past month.
A bit like this pic but its shown in percentage and I do not mind it not showing percentage but i am stuck trying to figure out how to make the small trxt show the increase based on the actual task count in either number or percentage.
( Do a search for Tasks (Constraint: Creation Date > Current Date/Time : +Days {-30} :count / Do a search fot Tasks : count ) * 100
In this example you will the the value increased in the last 30 days as percentage.
If you really want the last month and not las 30 days you will need to use the Currents Date/Time like in the expression above, but then you will need to apply some changes to this date. In this case you need to replace the month in the date by using the change month to operator.
Then to set the month properly you will need to extract the Current Date/Time month and check if it is > 1. If so then reduce 1, if it is not > 1 this means the current month is January, so set the value to 12.
The same verification using the month need to be used to rebuild the year argument in the date. In this case the month verification is needed because of the current month is 1, this means is is January, so reducing you are going to type 12 do reflect December results, but December in this case are referencing the precious year, so if this verification returns true, just reduce 1 year from the current one.
I forgot to mention. In case you need the previous month instead last 30 days, you will also need 2 constraints in the 1st search. This is necessary to return a list where Creation Date is contained in a range, this means between last month (1st and last day).
This works great and shows the increase over the last 30 days, would you mind confirming where the adjustments in this statement need to be for me to show a decrease over the last 30 days please?
Sure… the piece in the expression is this: Current Date/Time + Days: {-30}
To give you some context, what you are saying to the expression here is…
Take the current date/time (Current date/time) and add days (+ days:), so you are typing -30. This means you are actually “adding” + (-30) days, which results in -30 days (30 days ago from current day).
So by changing this number of days -30 you can make the search return things in the past or future as you need.
You can, for example, have a dropdown with some filter options (30, 60, 90 days) and use this dynamically in the expression. Or even an Option Set with custom labels that has an attribute like number of days linked and use that as a filter. Anyways, there are many approaches.