CURRENT YEAR SALES DATE PARAMATER AND PRIOR YEAR SAME DATE RANGE
I am pulling data from a SQL view dbo.view that has current and historical SOP data by line. The date paramater is a date range, uppr date and lower date formulas are in the report. I need to include prior year SOP data for the same prior year date range in the detail. I have tried adding the view in twice with no luck, just duplications. Ultimately I want to supress the detail and only show the totals by customer so it is comparitive. Thanks for your help. Jayne
OK
lets simplify it
get a test data source with some simple dates in it.
get the report logic working.
it looks like you have the right formula ideas but lets go for
@upperthisyear
@upperlastyear
@lowerthisyear
@lowerlastyear
then assuming a date field of {table1.date}
the record selection would be
if (@upperthisyeare > {table1.date} and @lowerthisyear < {table1.date}) or (@upperlastyeare > {table1.date} and @lowerlastyear < {table1.date}) then 1 else 0
I would test this by using it as a formula field with the test data.
Similar Messages
-
Previous and Prior Year Date Values
How do I get the Previous, Prior year month and Prior year previous month values from a given date?
Ex: Input would be: 05/01/2008
The output should be:
05/01/2008 - Current Month
04/01/2008 - Previous Month for the Current Year
05/01/2007 - Prior year current Month
04/01/2007 - Prior Year Previous Month
Please let me know..Hi,
Then you'll probably do a self-join. In one copy of the table, you'll get the data from date d1, and in the other copy, you'll get the data from date ADD_MONTHS (d1, -12).
If, ultimately, you are going to show four sets of figures (from four different rows representing four different dates) on the same output line, then you may find it more convenient to do a pivot rather than a self-join. Search for the buzz word "pivot" and you'll get lots of examples. You might start by selecting four rows:
WHERE dt IN
( d1
, ADD_MONTHS (d1, -1)
, ADD_MONTHS (d1, -12)
, ADD_MONTHS (d1, -13)
) ...and then pivoting that data into four columns:
SELECT ...
, MAX (CASE WHEN dt = d1 THEN val END) AS this_month
, MAX (CASE WHEN dt = ADD_MONTHS (d1, -1) THEN val END) AS one_month_ago
, MAX (CASE WHEN dt = ADD_MONTHS (d1, -12) THEN val END) AS one_year_ago
, MAX (CASE WHEN dt = ADD_MONTHS (d1, -13) THEN val END) AS thirteen_months_ago
... -
Need to apply MTD logic for actual and prior year
Hi Team,
We are facing an issue with MTD calculation based on formula variables,
Issue: MTD Only (Actual and Prior Year) – show the same value for MTD.
Requirement:
When the query is run for a selected month, the query should be run for that month based on the Last TECO Date (Input Variable).
• For example, dashboard is run for January 2014, the calculation of MTD should be based on the Last TECO Date : i.,e if I enter older date/month (not current date)[ 1/20/2014 means it should calculate for 1/1/2014 – 1/31/2014]
• If the dashboard is run for the current month, the MTD calculation should be on Last TECO Date = 1st day of month – Current Day
The above same calculation logic should be applicable for MTD prior year: instead of the input variable value, the value for previous year should be considered
Final Calculation:
If Last Labour Date is blank, 0, else Last TECO Date – Last Labour Date (by individual line item)
Here we created two formula variables for last teco date and last labour date.
Also created 2 Customer Exit variable for MTD Actual calculation.
We have pulled the formula variable and CE variable into the selection and created a new CKF (Teco date).
We have done the final calculation on the basis of the ( (labour date ==0)*0 + last teco date-last labour date )for MTD ACTUAL.
MTD Prior Year-
when have done calculation on the basis of the( (labour date ==0)*0 + last teco date-last labour date )for MTD Prior year by giving offset -12 to the value.
Here for MTD Actual and MTD Prior year values are coming same ,we tried with by doing customer exit variables as well, Still values are coming same.
please give your valuable inputs/suggestions to proceed for this requirement .I assume the Sales measure is a monthly measure. The Prior year calculation as I described will give you the sales for the same month in the previous year when selecting month in your report. When selecting year it will add up all months of the prior year until now and you will indeed see the Prior year YTD.
If you want to see the total sales for the previous year you have to use the same calculation as 'Prior year' and map it to the year level of your time dimension. This will work as a 'partition by year'. -
How to use the Time Variants PYTD and Prior Year Annual?
Hi,
We have a time dimension which has the generic columns i.e Month, Year.
We need to calculate the Time variants for the Facts Say Sales. I was able to calculate the Prior Month, Current YTD
I have some doubts regarding the other variants:
1. Prior Year : Does this include the Prior Year Annual?
2. Prior YTD: How to calculate it?
Somehow I am getting the same results for PYTD and Prior Year.
The formula used are :
Prior Year:
AGO(Sales, Year, 1)
PYTD:
AGO(Sales CYTD, Year, 1)
Has anybody encountered similar issue?I assume the Sales measure is a monthly measure. The Prior year calculation as I described will give you the sales for the same month in the previous year when selecting month in your report. When selecting year it will add up all months of the prior year until now and you will indeed see the Prior year YTD.
If you want to see the total sales for the previous year you have to use the same calculation as 'Prior year' and map it to the year level of your time dimension. This will work as a 'partition by year'. -
can we with ligthroom have the sofware set up on multiples computer mac and mc and share the same dat base library?
No, a Lightroom catalog cannot be on a networked drive, and can only be accessed by a single user at a time.
-
How to change a date to sunday prior to any date
Hi All,
I have a requirement to change a date to sunday prior to any date. for example,
If date is 6/30/08 , then i need to change it to 6/29/08. If date is 6/26/08, then i need to change it to 6/22/08.
How to do the same.
Regards,
NehaHi ,
i think u can use this FM
GET_WEEK_INFO_BASED_ON_DATE
Import parameters Value
DATE 26.06.2008
Export parameters Value
WEEK 200826
MONDAY 23.06.2008
SUNDAY 29.06.2008
by using this FM u will get Starting date of that week will come , in this case 23/06, so u need to code like this
last sunday = mmonday - 1.
regards
Prabhu -
Mapping between oracle data types and ms sql server data types
hello
i need mapping between oracle data types and ms sql server data types
where can i find them ?read this
http://download.oracle.com/docs/cd/E10405_01/doc/appdev.120/e10379/ss_oracle_compared.htm -
Data Warehouse and ETL tools for data verification ?
Data Warehouse and ETL tools for data verification ?
How need to to data verification using ETL tool ? Also how to relate this thing to datawaehouse ?
Thanks in AdvanceHi Shyamal Kumar,
1) BW it self facilitates to do the ETL (Extraction Transformation Loading) steps:
example:
Extraction - from SAP or other data bases
Transformation - using transfer rules, Updates rules
Loading - Loading into ODS, Cube, master data
2) Typically used ETL tools in the industry are:
a) datastage from Ascential (owned by IBM)
b) Informatica
c) Mercator
Regards, BB -
Report with Current and Prior Year
I'm looking to create a report with fields Report Group, Year, and Actual Dollars. Where the Year includes the current year and the prior year (NOT user input). The format would be:
Report Group | | Year | | Actual Dollars
Product Revenue | | 2008 | | $100
Product Revenue | | 2009 | | $200
etc
Sounds simple enough but I'm having difficulty getting it to work since I need the Year field in the report (and I'm new to WebI).
Thanks for your help,
DaveHi David,
I'd suggest you use a Query filter (or a report filter) to retrieve only rows that match this criteria on years. Since you need two values, I may have to use the filtering operator 'in list'
Difference between those two is query filter will only retrieve to values where year = 2008 or 2009 from the datasource (so if you want to change the year values, you will have to refresh document), while report filters are active on the query output (which means that no refresh from the DB is required if you need to change values), which might bring a better experience if you need interactivity in the report. Moreover, if interactivity is important and you are working with WebI XI 3.1 SP2, you can embed these report filters into Input Control, and command the filter from a graphical widget like check boxes, to let user control which years he wants to view/ compare in the table (or chart).
Hope that helps,
David. -
Does Lion work with Turbotax 2010 and prior years?
Does the current year version of TurboTax work with Lion. Also are there any "cut-off" prior year compatibility issues. Intuit has not posted a confirmation on their website.
Thanks baltwo. I went to the Intuit discussion forum and found a tip which led to solving my specific problem discussed above. I was able to resolve the problem by turning off the Resume function in TurboTax per the following link:
http://osxdaily.com/2011/08/01/turn-off-resume-per-app-in-mac-os-x-lion/
Specifically, I typed the following into Terminal:
defaults write com.intuit.turbotax.2010 NSQuitAlwaysKeepsWindows -bool false
I had to recover my original file from a backup, but now all is well with making changes, saving the file and reopening the file. -
Acquisation year deprecaiton is different and second year onwards normal %
Hi,
Regarding depreciation calculation, some asset will have the 35% of depreciation for the first year acquisation and second year onwards system wants to calculate 25%. For example if asset purchased 2008 then the depreciation for 2008 is 35%,
and 2009 the depreciatio will be 25%. Under the same asset class if you purchase any new assets in 2009 then the % will be 35% and for 2010 depreciation will be 25%.
Acquisation year depreciation percentage is 35 remaining years 25%. This is the concept. Can any one guide me on the issue to be solved.
govind.i think it is not possible with this method.
How will you specify particular time period for a particular asset?
ex: Three assets are available for a asset class. in that one asset is acquired this year and remaining two are old.
this situation how will we assign the dep.keys?
explain me -
I currently have a requirement to create a time channel in the data portal and subsequently fill it with data. I've shown below how I am currently doing it:
Time_Ch = ChnAlloc("Time channel", 271214 , 1 , , "Time" ,1 ,1) 'Allocate time channel
For intLoop = 1 to 271214
ChD(intLoop,Time_Ch(0)) = CurrDateTimeReal 'Create time value
Next
I understand that the function to create and allocate memory for the time channel is extremely quick. However the time to store data in the channel afterwards is going to be highly dependent on the length I have assigned to the Time_Ch. In my application the length of Time_Ch is variable but could easily be in the order of 271214 or higher. Under such circumstances the time taken to fill Time_Ch is quite considerable. I am wondering whether this is the most appropriate way of doing things or whether there is a more efficient way of creating a time channel and filling it.
Thanks very much for any help.
Regards
MatthewHi Matthew,
You are correct that there is a more efficient way to do this. I'm a little confused about your "CurrDateTimeReal" assignment-- is this a constant? Most people want a Time channel that counts up linearly in seconds or fractions of a second over the duration of the measurement. But that looks like you would assign the same time value to all the rows of the new Time channel.
If you want to create a "normal" Time channel that increases at a constant rate, you can use the ChnGenTime() function:
ReturnValue = ChnGenTime(TimeChannel, GenTimeUnit, GenTimeXBeg, GenTimeXEnd, GenTimeStep, GenTimeMode, GenTimeNo)
If you really do want a Time channel filled with all the same values, you can use the ChnLinGen() function and simply set the GenXBegin and GenXEnd parameters to be the same value:
ReturnValue = ChnLinGen(TimeChannel, GenXBegin, GenXEnd, XNo, [GenXUnitPreset])
In both cases you can use the Time channel you've already created (which as you say executes quickly) and point the output of these functions to that Time channel by using the Group/Channel syntax of the Time channel you created for the first TimeChannel parameter in either of the above functions.
Brad Turpin
DIAdem Product Support Engineer
National Instruments -
Create a ReportingServices data source and upload to a data connection library
I have installed reporting services 2012 in SharePoint 2013 integrated mode. I need to create a report data source and upload it to a data connection library using
C#.
As I know it uses the ReportingServices2010 class but I cannot explore a reporting server url.
There is a ReportingServices2010.asmx file in the 15 hive though.
Also it works fine when I manually set the data source.Hi,
The following materials would be helpful:
Inserting Data Connections into a SharePoint Library
https://social.technet.microsoft.com/Forums/en-US/df79dce5-fd92-4506-af4e-11127cb0d655/inserting-data-connections-into-a-sharepoint-library?forum=sharepointdevelopment
Programmatically exporting reports from SQL 2012 Reporting Services
http://stackoverflow.com/questions/12199995/programmatically-exporting-reports-from-sql-2012-reporting-services
Report Server Web Service Endpoints
http://msdn.microsoft.com/en-us/library/ms155398(v=sql.110).aspx
Best Regards
Dennis Guo
TechNet Community Support -
Replication and logshipping on same data source object
TWO QUESTIONS:
Question1:
I have a database "dbABC" on SERVER1 that is log shipped to REPORTSERVER and is recovered Standby, Read Only.
I also need to replicate a subset of same data "dbABC" to a different SERVER2.
When I add the publication to SERVER1, is appears on REPORTSERVER and flags the logshipped "dbABC" (readonly) as a published database and displays articles and subscriptions on REPORTSERVER.
Is there a way NOT to push the replication to the Report Server, since it is read only?
Question2:
Also, when changing ownership of "dbABC", will the ownership also log ship to the Read Only copy on REPORTSERVER and syncronize ownership between SERVER1 and REPORTSERVER?
JanineIt is meta data which travels with the backup and log shipped tlogs.
Unless you do your final restore with the keep_replication switch this metadata will disappear when you do your final restore and run the recovery on your database.
looking for a book on SQL Server 2008 Administration?
http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
This!
John Sansom | SQL Server MCM
SQL Server DBA Blog |
Twitter: @SqlBrit |
LinkedIn -
Every File and Email has Same Date
Hi
I've seen other similar problems on here but not identical, and nobody seems to have resolved them successfully anyway ...
All my emails, from different accounts, saved/inbox/stored on own computer/stored elsewhere have the same date, some insignificant date from the past (long before the date I bought the Macbook). I use Thunderbird, but it definitely seems to be a problem with Snow Leopard because it is also true of all the "last modified" etc dates when I try to open files in Microsoft Office - the same date appears every time. I've tried updating Snow Leopard - it doesn't help. Finder shows the file dates correctly.
I've tried adjusting the "set date automatically" settings and time zones etc, it doesn't make any difference.
Any suggestions?Hi
I've seen other similar problems on here but not identical, and nobody seems to have resolved them successfully anyway ...
All my emails, from different accounts, saved/inbox/stored on own computer/stored elsewhere have the same date, some insignificant date from the past (long before the date I bought the Macbook). I use Thunderbird, but it definitely seems to be a problem with Snow Leopard because it is also true of all the "last modified" etc dates when I try to open files in Microsoft Office - the same date appears every time. I've tried updating Snow Leopard - it doesn't help. Finder shows the file dates correctly.
I've tried adjusting the "set date automatically" settings and time zones etc, it doesn't make any difference.
Any suggestions?
Maybe you are looking for
-
I have just aquired an iPod Touch 2nd Generation 8GB. When it is connected to my PC, running Vista home, it says it has synced successfully but I can,t transfer onto it an album I have bought and downloaded from iTunes. Help!!! This is my first Apple
-
hi, i'm new in macbook air, i was miss formatted and delete all my data on my external hard disk (pic, microsoft office document and etc). i spend 45gbp to install the software fianlly recovery all the data! but why my text document can't open and re
-
Hi, This must be quite a common problem. A purchase is defined as something one acquires by paying. The app store gives you access to download free items or download items for trial. Most are rubbish. Because the ipad doesn't support multiple login a
-
OT - Non-Existent Watch List Spewing Tons of Email
Sorry for the off topic post here, but you guys need to put some other mechanism in place for contact regarding Forum problems. There's NO contact information for this type of action, and I think there should be a link directly in all posted emails f
-
Formatted Search to pull Sales Order Remarks field onto Purchase Order
Hi Guys, I need a formatted search for a Purchase Order remarks field, which will pull the remarks field from the linked Sales Order (When a PO is done through the logistics tab of the Sales Order) I have made this query but it is not working: SELECT