Selection formula for capturing previous month data only in lotus notes - lotus-notes

what selection formula we have to used for capturing previous month data only in a view in lotus notes 7.0 version

Please note that view selection formulas using variable times (#Now, #Today) are hell on server performance, since every time the view is accessed it needs to check when "now" is. In Notes and Domino 7, you would be far better off to use a hard-coded date range and a scheduled agent to change the view selection formula on a monthly or daily basis (depending on whether you mean "last month" or "between this date last month and today").
Please see the Performance Basics for Lotus Notes Developers whitepaper for more information.

You'll need to compare the date field in your documents to #Today minus one month, and select all documents with a date greater than or equal to that calculated date.
Use the #Adjust formula to calculate the current date minus one month:
SELECT #Adjust(#Today, 0;-1;0;0;0;0) >= YOURDATEFIELD

Related

Problem with SSAS ParallelPeriod and Excel 2013 Timeline Filter

Currently i had a project using Microsoft SQL Server Analysis Service. I found a problem regarding filtering data with excel timeline.
Here is my date dimension screenshot:
<img src="https://i.stack.imgur.com/NUr2x.png"/><img src="https://i.stack.imgur.com/5OSgA.png" />
I had a cube with 2 measures, Sales Quantity (measures) and Sales Quantity Last Year (calculation). Here is MDX expression for Sales Quantity Last Year calculation:
( ParallelPeriod([Date].[YM].[Calendar Year],1,[Date].[YM].CurrentMember),[Measures].[Sales Quantity In 1000] )
After deploying the project to my local server, the data can be shown perfectly using excel 2013:
Pic: Data in Excel without filter
The problem start when i want to filter the data using excel timeline. When i filter only '2016', my calculation measure is no longer working. You can see the data in 'Sales Quantity in 1000 LY' column is blank. It looks like that i cant see the data outside current filter (2016). Pic: Filtered using timeline filter
But when i use slicer, the data can be shown normally Pic:Filtered using Slicer
Did i make a mistake in building date dimension? Or i need to fix the MDX calculation query? Because when i test this case in Microsoft AdventureWorksDW2014 with the same date hierarchy and the same calculation, all is going well.
Your parallel period calculation looks correct assuming [Date].[YM] is your date hierarchy. I am guessing that your date dimension is off somehow.
Make sure that:
it has a hierarchy created, and the hierarchy is what you are referencing in the parallel period calculation. Here is an example, you could have more or less attributes in the hierarchy obviously.
Your attribute relationships are defined correctly.
Key columns on the attributes in the hierarchy are correct. In the example above, you would just make year the key for the year column, but then for quarter it would be a collection of the year and quarter column. For period, key columns would be year, quarter, period. For week, key columns would be year, quarter, period, week. Date would just use the date column since date is the key.
4.Make sure that the date key attribute is using a date field for it's value column, as a time slicer needs this.
define time intelligence on your date dimension. Right click on the date dimension on the solution explorer and choose add business intelligence, then on choose enhancement screen pick define dimension intelligence. Then set the attribute type for each dimension attribute. Here is how it would be for our example.
Hopefully one of these does it for you.

Lotus Notes View Column Date Format

I have imported an excel file into a Lotus Notes database using LotusScript. One of the columns in my view (which displays the imported data) shows a date. If the year is greater than 2000, it is shown with 4 digits e.g. 2001.
However if the year is less than 2000 the year is displayed with just 2 digits e.g. 99.
Does anybody know why this is?
The date is contained in a text field. The column uses the "Date / Time" style with "Show Only month, day and year". Display Time is not selected.
In your column properties, look at the 4th tab (Advanced Format). You say you have "Date/Time" selected, and "Display Date" selected. Nex to that in the "Special" field, have you ticked "Show 4 digit year for 21st century"? If so, 20th century dates will show with 2 digits, 21st century ones with 4.
I remember when this feature was added, and thinking how cool it was. God, I feel old!

Dynamic Sales Summary Depending on Month (can't use MAXIF/MINIF)

I have a student license of Office Pro 2016, but somehow it doesn't have the IFS, MINIF/MINIFS, MAXIF/MAXIFS functions that would make my life so much easier. I tried to illustrate what I'm doing in the image below:
Example
My actual data is much more complicated and long, but the idea is that I will periodically manually update data within the DATATABLE, and I want the SUMMARYTABLE to reflect the total pending sales by month. There are never more than two months pending at a time, and if only sales from one particular month are pending, I don't want the second row to appear.
I've already found a way to display the month in this case using regular MAX and MIN functions, but now I'm stumped as to how to display the sum total of sales within those months. Specifically, I don't know how to make a reference to a particular month in my criteria.
I've tried this formula:
=SUMIFS(DATATABLE[SALES],DATATABLE[SHOP]="A",DATATABLE[STATUS]="PENDING",MONTH(DATATABLE[DATE]),SHOPATOTALS[MONTH])
If this worked it would have been perfect, but the month portion isn't recognized as a proper range.

Sharepoint 2013 - create a column that contain current date in sharepoint list

I am very new to sharepoint,
currently i am working to create a column that contains current date in sharepoint list.
the problem is i want the date automatically change based on today's date.
for example,
today is 19/12/2014,
and when it comes to tomorrow it will change automatically to 20/12/2015, and next.
It is one of the standard choices, if you choose column type "Date and time"- see the defaults section at the bottom.
You can add formula
=[Today]
if you have bad day thats mean you have messes up with servers time services but you can hitfix that:
=[Today] + 1
but it will only work after editing the item (I think), so programically solution is timerjob that run everyday and set last day dates to next date

SharePoint View to automatically show only the current month?

I need to create a view that will automatically change from month to month to show only the current month (i.e. if current month is July - show items posted in July). Currently I have a view set up, but I have to manually change the month each time it changes (it's set up based on the first day of the current month and the last day of current month).
Thanks
You can do this by turning the problem on its head.
First you need to add two calculated columns that will work out the start an the end of the month. (This example uses [Due Date] but you can use any date/time column)
"Start of Month" =DATE(YEAR([Due Date]), MONTH([Due Date]), 1)
"End of Month" =DATE(YEAR([Due Date]), MONTH([Due Date])+1,1)-1
Then you setup a filter in your view for
"Start of Month" is less than or equal to [Today]
AND
"End of Month" is greater than or equal to [Today]
How To Use Filters in SharePoint to show items in the current Calendar Month
Create a CC "NextMonth" that adds one month to your date
=DATE(YEAR(Modified),MONTH(Modified)+1,"1")
create a view "ThisMonth" with this filter
"NextMonth" is greater than [Today]
this will always return the current month. can also be allpied to Year, to return current year
Create a CC "NextYear" that adds one year to your date
=DATE(YEAR(Modified)+1,MONTH(Modified),"1")
create a view "ThisYear" with this filter
"NextYear" is greater than [Today]
Now the trick is to return a view for last Month. Let me know if you figure this out
EDIT: Please see Ryan's solution below, it's more comprehensive.
I believe there is no out of the box solution for that. One trick can be to write code in default view which would actually set the month for you or redirect to any other view. Something like
SPWeb web = SPContext.Current.Web;
string[] monthViewUrls = { "url1", "url2", ... };
string currentMonthUrl = monthViewUrls[DateTime.Now.Month-1];
Response.Redirect(currentMonthUrl );
Hope this helps.
Can you live with the calendar view? That shows current month by default. Maybe you can start with that and try to customize it in SPD - it might retain its current month behavior.
Start of Previous Month
=DATE(YEAR(Created),MONTH(Created)-1,"1")
End of Previous Month
=DATE(YEAR(Created),MONTH(Created),-1)

Resources