Need to get max month in quarter
Hi,
I need to get max month exchange rates in quarter for my caluclation view ?
Can you any one suggest ?
Regards,
Ram
Autoresponse
max month in quarter using hana sql
Similar Messages
-
SSAS Tabular DAX- Need to get MAX value of the MIN (top)hierarchy level row
EDIT:
I got closer to resolving the issue using MAX.
However, If I remove the department hierarchy and just place on the MAX measure I get the single largest value out of all departments.
It would be ideal if the measure could still SUM the "top level" values across everything in the system if the hierarchy is not placed on the rows grouping.
So it returns the largest value for a given department, but if the department hierarchy isn't present I need it to return a SUM of all the level 1 values for all departments...
Basically return MAX value from the MIN L1ID's DeptLevel value, but I can't seem to construct that DAX query. So if DepartmentID hierarchy is on display it gets MAX per row, but if that is removed it dips into MAX GoalValue for each L1ID grouping with
the MIN DeptLevel.
/EDIT
I have a rather odd data table I'm bringing into a SSAS Tabular model.
Instead of having all data at each child level and then it adding up to a grand total in the parent, it has a grand total predefined at each child level.
I just need this tool to display the raw data if at all possible instead of trying to aggregate everything. Filter on active level, ignore child levels.
Is there a way to do that?
Example:
SalesGoalsByDepartmentLevel:
Level1 (top level) = 5,000
Level2( lower level) = 0
Level3(lower still) = 500
Level 4(lowest) = 4,250
So note that adding up all the child levels is still $250 shy of the top 5,000.
IT is just an odd business rule, basically each level is expected to meet that goal or exceed it, the top level goal is 5,000 but management doesn't care where that last 250 comes from, they do are that each defined level is met.
These levels are in a hierarchy so if I view the top level of the hierarchy it adds up to 4250+500+5000=9750 when I just want to see 5,000 at the top level and the details when they drill down.
I added a filter to just filter to the top level, but then when I drill down of course those lower levels are blank.
Is there a way to filter on the current displayed level without aggregating all child levels?
Thanks!You might want to take a look at the Parent-Child Hierarchies pattern here:
http://www.daxpatterns.com/parent-child-hierarchies/
You might write DAX code to check what is the "current" level (see BrowseDepth measure in the sample file you can download) and depending on its level, se the filter to blank to all the levels below, so you don't aggregate "children".
Just an idea, I'm not sure if it corresponds to your requirement and I don't have time to make more tests.
I hope it will be helpful.
Marco Russo (Blog,
Twitter,
LinkedIn) - sqlbi.com:
Articles, Videos,
Tools, Consultancy,
Training
Format with DAX Formatter and design with
DAX Patterns. Learn
Power Pivot and SSAS Tabular. -
Help - Need to Get Max(Date) from An Unrelated Table in PowerPivot
I have two tables in my Power Pivot model:
Table A (a many table)
Asset
SerialNumber
User
CTUT111
YC112233
Bob
CTUT222
ZZ221144
Susy
CTUT222
ZZ221144
Larry
CTUT333
AB332244
Bob
Table B (a many table, a CSV import from another system)
Asset
SerialNumber
CheckIn_Date
CTUT111
YC112233
6/15/2014
CTUT111
YC112233
6/20/2014
CTUT222
ZZ221144
6/18/2014
CTUT333
AB332244
6/20/2014
I know it appears odd that Table B would have two entries for the same Asset (CTUT111), but it does.
I know I could write a SQL query that gave me the MAX(CheckIn_Date), but I’m not staging these datasets in a SQL server first.
I’m pulling directly from CSV tables.
I don’t want to have bridge tables either, if possible.
So, I’m left with a many-to-many situation in Power Pivot.
I want to add a Calculated Column to Table A, called ‘Latest CheckIn Date’ – which I get from Table B, matching on Serial Number.
So, when I’m done, I would expect the value for Asset=CTUT111 to be 6/20/2014 (since it’s the MAX of a value of dates)
I’m trying this pattern from Marco Russo in which you don’t need to relate two tables to exchange information, but it doesn’t appear to be working.
=CALCULATE (
MAX ( VALUES ( TableB[CheckIn_Date] ) ),
FILTER (
TableB,
'TableA'[SerialNumber]
= TableB[SerialNumber]
I’ve also tried to use LOOKUPVALUE, but I can’t seem to figure it out.
Would appreciate the help.
Thanks in advance.
-EricHi Eric,
Please, try this one formula:
=CALCULATE (
MAXX ( VALUES( TableB[CheckIn_Date] ); TableB[CheckIn_Date] );
FILTER (
TableB;
'TableA'[SerialNumber] = TableB[SerialNumber]
P.S. In my locale I use ";". According to your locale you should use ",".
Truly yours,
Paul -
30" ACD: What adapter do i need to get max resolution?
I'm connecting the display to my Macbook Pro, purchased in 2008. It talks about a "mini display port" but I can only see the bigger one with the slit and 4 pegs. After googling it, I found that the mini one is on my graphics card?? Specs of my graphics card are NVIDIA GeForce 8600M GT.
Can anyone tell me which adapter I need??
Thanks!I am not sure what you are referring to by macbook pro 3, but you will likely need this cable if the computer was purchased during the last few years:
http://store.apple.com/us/product/MB572Z/A?mco=MTY3ODQ5OTY -
Hi,
I have requirement to get max month and year from a table.
DESC WHR_REPORT
REPORTMONTH NUMBER(2)
REPORTYEAR NUMBER(4)
Sample data in table
reportmonth reportyear
01 2009
02 2009
03 2009
04 2009
09 2009
12 2009
01 2010
02 2010how do i get the max date which means 022010 from the table?
thanks
sandyGive this a shot:
SQL> WITH whr_report AS
2 (
3 SELECT 01 AS reportmonth, 2009 AS reportyear FROM DUAL UNION ALL
4 SELECT 02 AS reportmonth, 2009 AS reportyear FROM DUAL UNION ALL
5 SELECT 03 AS reportmonth, 2009 AS reportyear FROM DUAL UNION ALL
6 SELECT 04 AS reportmonth, 2009 AS reportyear FROM DUAL UNION ALL
7 SELECT 09 AS reportmonth, 2009 AS reportyear FROM DUAL UNION ALL
8 SELECT 12 AS reportmonth, 2009 AS reportyear FROM DUAL UNION ALL
9 SELECT 01 AS reportmonth, 2010 AS reportyear FROM DUAL UNION ALL
10 SELECT 02 AS reportmonth, 2010 AS reportyear FROM DUAL
11 )
12 -- END SAMPLE DATA
13 SELECT MAX
14 (
15 TO_DATE
16 (
17 LPAD
18 ( reportmonth
19 , 2
20 , '0'
21 ) || reportyear
22 , 'MMYYYY'
23 )
24 ) AS MAX_DT
25 FROM whr_report
26 /
MAX_DT
02/01/2010 00:00:00This is a case where you should use the correct data types to store data. These two column should be ONE column with a data type of DATE. -
Help needed in getting the previous Quarter Data
Hello folks,
I have this procedure where i have to modify the current procedure in the following manner:
I need to get rid of the variables p_start and p_end so that i cannot see them in the crystal report and include the Frequency in the procedure to get the Data based on the Dates.
and Main requirement is" If the Frequency is Quarterly " it should get the previous quarter Data, if "Frequency is monthly" it should return the previous month data.Can anyone please let me know where shud i make changes. Am including the procedure for refernce. Any help is appreciated
Thanks a millioin,
CREATE OR REPLACE PROCEDURE hcsc_recovery_report_h(report_record in out cr_return_types.gen_cursor,
p_start string,
p_end string)
IS
v_startdate date;
v_enddate date;
BEGIN
v_startdate := to_date(p_start, 'YYYY/MM');
v_enddate := last_day(to_date(p_end, 'YYYY/MM'));
open report_record for
select --distinct r.recovery_id
r.event_id,
r.event_case_id,
c.client_id,
c.client_code,
c.client_name,
b.branch_group_code,
b.branch_group_description,
g.employer_group_code,
g.employer_group_name,
e.client_policy_identifier,
e.date_of_incident,
e.event_type_code,
sum(nvl(r.amount, 0)) as amt_received,
nvl(sum(case
when r.amount >= 0 then
rd.fees
else
rd.fees * (-1)
end),
0) as fees,
ec.close_date, *001* commented
(case
when ec.close_date <= to_date(to_char(v_enddate, 'MMDDRRRR') || '235959',
'MMDDRRRR HH24MISS') then
ec.close_date
else
null
end) as close_date, --*001* added
get_case_value(ec.event_id, ec.event_case_id, v_enddate) as case_value,
nvl(etl.fee_percent_flag, 'N') workmans_comp,
max(to_char(r.recovery_date, 'FMMonthYYYY')) Year_Month,
max(to_char(r.recovery_date, 'YYYYMM')) Y_M,
max(to_date(to_char(r.recovery_date, 'MMYYYY'), 'MM/YYYY')) date_MY
from recovery r,
recovery_detail rd,
event e,
client c,
branch_group b,
employer_group g,
event_case ec,
event_type_lookup etl
where r.event_id = e.event_id
and r.event_case_id = ec.event_case_id
and ec.event_id = e.event_id
and rd.recovery_id(+) = r.recovery_id
and r.recovery_date between v_startdate and
to_date(to_char(v_enddate, 'MMDDRRRR') || '235959',
'MMDDRRRR HH24MISS')
and e.client_id = c.client_id
and g.client_id = c.client_id
and b.client_id = c.client_id
and g.employer_group_id(+) = e.employer_group_id
and b.branch_group_id(+) = g.branch_group_id
and e.event_type_code = etl.event_type_code -- SST 130852 04/14/09
group by r.event_id,
r.event_case_id,
c.client_id,
c.client_code,
c.client_name,
b.branch_group_code,
b.branch_group_description,
g.employer_group_code,
g.employer_group_name,
e.client_policy_identifier,
e.date_of_incident,
e.event_type_code,
ec.close_date,
get_case_value(ec.event_id, ec.event_case_id, v_enddate),
nvl(etl.fee_percent_flag, 'N')
having sum(nvl(r.amount, 0)) <> 0
order by c.client_code,
b.branch_group_code,
g.employer_group_code,
r.event_case_id;
Edited by: user11961230 on Oct 20, 2009 9:02 AMuser11961230 wrote:
1. I want to get rid of the p_start and p_end. So how do i declare the v_startdate and v_enddate in the following part?
v_startdate := to_date(p_start, 'YYYY/MM');
v_enddate := last_day(to_date(p_end, 'YYYY/MM'));I'm not sure what you mean by "declare".
In PL/SQL, "declare" means state (at the beginning of a block) that there will be a certain variable with a certain name (such as v_startdate) and datatype (such as DATE). You're already declaring the variables v_startdate and v_enddate correctly, right before the BEGIN statement.
Declaring a variable is not the same as initializing it, that is, giving it a value for the first time. Your next question seems to be about initializing..
2. where exactly shud i include the logic that u have mentioned. sorry a dumb questionIn place of the two assignment statments that reference p_start and p_end.
3. This time am gonna use frequency instead of report_type so that i will get rid of the p_start and p_end from the procedure.Do you mean you want to pass an argument (called frequency) that tells if you want a quarterly or a mionthly report, just like the variable report_type in my example?
If so, replace report_type in my example with frequency.
I think you want something like this:
CREATE OR REPLACE PROCEDURE hcsc_recovery_report_h
( report_record in out cr_return_types.gen_cursor
, frequency IN VARCHAR2
IS
-- Declare local variables:
v_startdate date;
v_enddate date;
BEGIN
-- Initialize v_startdate and v_enddate, depending on frequency
IF frequency = 'QUARTERLY'
THEN
v_startdate := TRUNC ( ADD_MONTHS (SYSDATE, -3)
, 'Q'
v_enddate := TRUNC (SYSDATE, 'Q');
ELSIF frequency = 'MONTHLY'
THEN
v_startdate := TRUNC ( ADD_MONTHS (SYSDATE, -1)
, 'MM'
v_enddate := TRUNC (SYSDATE, 'MM');
END IF;
-- Subtract one second from v_enddate
v_enddate := v_enddate - ( 1
/ (24 * 60 * 60)
open report_record for
select --distinct r.recovery_id
r.event_id,
and r.recovery_date BETWEEN v_startdate
AND v_enddate
...When you post formatted text on this site (and code should always be formatted), type these 6 characters:
(small letters only, inside curly brackets) before and after sections of formatted text, to preserve spacing.
Edited by: Frank Kulash on Oct 20, 2009 2:37 PM
Changed query to use BETWEEN -
Hello I am writing on behalf of my fiance as I deal with all of our finances. Basically I have worked hard to get his score up from high 400's (yes that's possible) to all reporting at or above 600. Recently his score plummeted after we opened up two new cards about 2-3 months ago and one showed up on his credit report practically maxed out. I had planned on paying it before the due date but we never got a bill it was reported with the balance before a bill was even circulated but that's a whole other issue. I am trying to recover from that currently he is at : EQU 570 Trans: 583 Exp: 567 we need a 640 to qualify for the down payment assistance program that we are in the process of trying to get. Here's a little background he has 0 collections 1 account with lates but after GW calls and letters they have finally stated they will delete all lates for 2014 but not 2015 which one was a 90 day late in Feb and a 60 Day in Jan. I'm hoping that because they are taking back the original 30 day late that those will be changed to 30 and 60 but we shall see. They said they will report at the end of my statement so 9/1 is the day for that. We recently had a family emergency and maxed out every single card. which is why we are back in the 500's since that's basically are only bad things on his credit (which is nothing compared to what I've got off) I'm hoping getting UTI down will help. Here's where we are with UTI on revolving and my goals for this month: Creditor NameCAPITAL ONELimit$500TermBalance$419 reported 83% uti(pay to $0 balance due 8/13) Cap 1Limit $400balance $337 reported 84 % uti(pay to $0 balance due 8/13) First PremierLimit $300Balance: $265 88%uti(already paid on 8/4 to $89 balance 29%uti but still hasn't showed up on report) First premierLimit: 700Balance: 599 85%uti(Paid down to 0 by statement closes 8/16 through e-check) Les Schwab TiresLimit: 1000Balance: 396 39%uti(pay down to 296 so 29% uti) That's all for my revolving which is mainly what I am worried about since I have no lates what so ever on my installment accounts. Any recommendations would be appreciated. I hate waiting for things to report I asked the lender if i could just pay and do a rapid rescore but she said its to expensive and time consuming that we were better off waiting for everything to report. Should this do the job of getting us to a mid 640 I had transunion at a 630 two months ago before the high uti. so im praying this will do it. We found out im pregnant and need to get civilly married but I wont marry until we buy a home because my credit is worse not to mention my student loan debt. Wish us luck and let me know if i should change my goals for higher score increases like leave them at 10 % rather than 0 balances?
Hello I am writing on behalf of my fiance as I deal with all of our finances. Basically I have worked hard to get his score up from high 400's (yes that's possible) to all reporting at or above 600. Recently his score plummeted after we opened up two new cards about 2-3 months ago and one showed up on his credit report practically maxed out. I had planned on paying it before the due date but we never got a bill it was reported with the balance before a bill was even circulated but that's a whole other issue. I am trying to recover from that currently he is at : EQU 570 Trans: 583 Exp: 567 we need a 640 to qualify for the down payment assistance program that we are in the process of trying to get. Here's a little background he has 0 collections 1 account with lates but after GW calls and letters they have finally stated they will delete all lates for 2014 but not 2015 which one was a 90 day late in Feb and a 60 Day in Jan. I'm hoping that because they are taking back the original 30 day late that those will be changed to 30 and 60 but we shall see. They said they will report at the end of my statement so 9/1 is the day for that. We recently had a family emergency and maxed out every single card. which is why we are back in the 500's since that's basically are only bad things on his credit (which is nothing compared to what I've got off) I'm hoping getting UTI down will help. Here's where we are with UTI on revolving and my goals for this month: Creditor NameCAPITAL ONELimit$500TermBalance$419 reported 83% uti(pay to $0 balance due 8/13) Cap 1Limit $400balance $337 reported 84 % uti(pay to $0 balance due 8/13) First PremierLimit $300Balance: $265 88%uti(already paid on 8/4 to $89 balance 29%uti but still hasn't showed up on report) First premierLimit: 700Balance: 599 85%uti(Paid down to 0 by statement closes 8/16 through e-check) Les Schwab TiresLimit: 1000Balance: 396 39%uti(pay down to 296 so 29% uti) That's all for my revolving which is mainly what I am worried about since I have no lates what so ever on my installment accounts. Any recommendations would be appreciated. I hate waiting for things to report I asked the lender if i could just pay and do a rapid rescore but she said its to expensive and time consuming that we were better off waiting for everything to report. Should this do the job of getting us to a mid 640 I had transunion at a 630 two months ago before the high uti. so im praying this will do it. We found out im pregnant and need to get civilly married but I wont marry until we buy a home because my credit is worse not to mention my student loan debt. Wish us luck and let me know if i should change my goals for higher score increases like leave them at 10 % rather than 0 balances?
-
My phone has been smashed I need to get records of all my iMessages and texts from the last month. How do I get these?
Do you have a backup of your iPhone which contains these messages?
If so, you can restore a new iPhone from that backup during setup.
If not, the messages are gone. -
Book revenue on this month but the cost of goods sold need to get from last month
Hi experts,
I have a question about cost and revenue. We have a standing service repair order and a contract to customer. Because the revenue is calculated by flight cycle so maybe when we get the flight cycle information for this month should be the midle of next month. Due to the monthly end close schedule I need to book the revenue on this month but the cost of the revenue we need the get the cost occur last month. For example, current month is May, 2014 and I book the revenue and posting date is May, 31, 2014. But the cost I just want the amount occurred in customer service order(IW31) on Apr, 2014. And the cost occured in May, 2014 should become WIP. Is it possible? Please advise.
Thanks and Best Regards,Hi experts,
I have a question about cost and revenue. We have a standing service repair order and a contract to customer. Because the revenue is calculated by flight cycle so maybe when we get the flight cycle information for this month should be the midle of next month. Due to the monthly end close schedule I need to book the revenue on this month but the cost of the revenue we need the get the cost occur last month. For example, current month is May, 2014 and I book the revenue and posting date is May, 31, 2014. But the cost I just want the amount occurred in customer service order(IW31) on Apr, 2014. And the cost occured in May, 2014 should become WIP. Is it possible? Please advise.
Thanks and Best Regards, -
i had iweb on my last computer - bought a new 2013 macbook pro a few months ago and it's gone. I have a webpage I build on it and now I need to get back in to update it. Help.
Well of course you won't have iWeb on a new MacBook from this year. iWeb has not shipped on new Macs for a long time now and Apple has not sold iLife through its stores or online for over a year and does not support iWeb any longer.
If you want iWeb now, you will either need to purchase a new copy of iLife or try and find the old install discs from your old Mac and re-install iWeb from that disc. It also depends on what iWeb version you were using too - iWeb 08 or 09? If 08, then this is not compatible with Mavericks which will be running on a new Mac, so you'll need iWeb 09 for this. If you can find your old install discs and they are iWeb 09 then go ahead and use these, but if not, you will have to purchase the iLife 09 or 11 boxed set from Amazon and both of these contain iWeb 09 and you can then install it.
Also, when you set up your new Mac, did you migrate info over? If you had built a website on your old Mac, then you need to data file where all iWeb info is stored and that is called your domain.sites file and you need this file to be transferred if you want your website back again.
Can you get access to thhis file on your old Mac and transfer it? If you can then fine, you can access your website again, but if not, you are out of luck and you'll have to re-build your website from scratch using iWeb.
If you don't have iWeb, then now might be a good time to move forward and look at the many alternatives that are out there such as RapidWeaver, Sandvox, and EverWeb which is billed as an iWeb replacement and is very much like iWeb, but with SEO and the ability to create drop down menus built in (check out http://www.everwebapp.com). Other alternatives also include Flux 4, Freeway Pro and Express and WebAcapella 4.
Have a look and most of these allow you to download free trials so you can try before you buy. -
Need to get data for month entered in user prompt to prior 12months.
Hi,
I have a report where i need to display total amount for current month to prior 12 months data...first column will be current month, second column is (current month-1),3rd col: (current month-2)....( current month-12).
Is there any way I could use current date to get previous 12 months in variables?
For example: if current date is 02/15/2010, I need get data for 01/2010, 12/2009, 11/2009,....01/2009.
For example: if I entered Month: 03 and year:2010 in prompt , then I need to get data for prior 12 months to that in the prompt for month:03?.The only way to do this is using restrictions on Universe... here you can have the restrictions for every month or a range using the user prompt and the system date.
Regards -
Need formula in my subreport to get last month date - CR XIr2
Post Author: olesco
CA Forum: Formula
I need to pass the value (#of units) from the subreport to the main report u2013 I know how to do that but my problem is I donu2019t know what formula should I put in my subreport to get last month date.
Both main report and subreport have a date parameter (Field link - {?DatePrompt}. What I need is when I fill in the current month date to the main report the subreport should process the last moth date.
Main report u2013 Date Range (2007-10-1) (2007-10-31) - result #of units = 22
u201CRecord Selection Formula Editor
DateRecd = {@DatePrompt} [i.e. current month]
Subreport u2013 should have data from last month - result #of units = 25
u201CRecord Selection Formula Editor
DateRecd < {@DatePrompt} [last month] ??????
There are 22 3 units this month and 25 units last month.
Any help is greatly appreciated.Post Author: SKodidine
CA Forum: Formula
DateRecd in dateadd('m',-1,minimum({@DatePrompt})) to dateadd('m',-1,maximum({@DatePrompt})) -
Hey! I bought Lightroom 5 but then realized I need another version to actually use it. So I want to return it and then just get a monthly Lightroom membership.
By “monthly membership” do you mean access to these forums, or paying $10/month for access to PS+LR, the Photography Plan?
If the latter, realize that you cannot get an earlier version of LR than 5 with the monthly plan, because LR4 had no ability to check to see if it is licensed via a subscription. This capability started with LR 5.
If you mean you need to buy LR4 or upgrade your computer to OS X 10.7+ or Windows7+, then your only option with your current computer is to buy the obsolete LR4 on somewhere like Amazon, and make sure it is the full version not the upgrade version. -
Hello. I have an iPhone 4S. I need to get a picture sent to me a little over a month ago. It is still in iMessages in a conversation. However, as i scroll up and click on the picture, iMessages closes down on me. Is there anything I can do to get this picture?
Close out of the message app, double tap the home button and completely close out of the app.
Then do a reset, no data loss. Hold down the home/sleep button together until you see the apple logo and then release, then wait for your phone to boot back up.
Then check and see if you can save the pic. -
I just purchased the monthly Adobe membership, but when I went to download it says not Mac compatible. Is there another version, or do I need to get a refund?
Hi margot,
Please refer to the following link in know about the specifications for Creative cloud:
System requirements | Creative Cloud
Moreover, if the version is not compatible you may download the previous version following the link as below:
Creative Cloud Help | Install, update, or uninstall apps
Regards,
Sheena
Maybe you are looking for
-
Error while creating grouspace using spaceswebservice
Hi, I am using peoplesoft appliation and trying to create new spaces using the spaceswebservice, i am getting the following exception. Copied from spaces.log: (9:05:04 AM) madanagopal.damodharan: <Apr 6, 2011 8:28:55 PM PDT> <Warning> <oracle.j2ee.ws
-
Hi, I have a few questions on "Warn About Changes" feature in 12i. 1. When the Warn about changes message will be thrown ? 2. In my page, im using the ViewObject (OAViewObjectImpl type) and setting its row attribute programmatically. But still not ge
-
Mac migration issue.....
I migrated Elements 12 from my Macbook Air to my Macbook Pro but when I try to open it I get a message that some of the application components are missing from the Application Folder and a request to reinstall. How do I do this? And how do I find my
-
Hi, i'm a Windows 7 user of HP Pavilion dm4. It has been weeks since iTunes works properly on my computer. I'm here to seek help from professionals or people who had encountered it before. Whenever I double-click on iTunes, it prompt me a message "Wi
-
Problems with distilling files in lion?
hey guys - hope someone can give me a hand with this Now on lion and looking to upgrade to quark 9 and also to acrobat pro x - colleague in the industry has has problems printing from quark 9 to a distiller file to run through acrobat distiller. No a