Sum up value at query level
I want to sum up value at query level ]
at cube level
Material Year Period Qty
A 001.2007 100
B 001.2007 200
A 001.2007 300
C 002.2007 400
at query, I want to show it in this way. How to do that in query? I don't want to make any change in cube.
Material Year Period Qty
A 001.2007 400
B 001.2007 200
C 002.2007 400
Thanks.
Hi,
You don't need to change cube. Just add year, period and material to row and qty to column. For period, select 'total' option.
Viswa
Similar Messages
-
Conflict between Date values at Infocube & Query Level
Hi Folks,
I am stuckup with a strange situation and it is:
The value of date fields are coming correctly at infoprovider level and when i call the same infoprovider at query level the values are totally different.
Any suggestions in this regard.
ThanksHi,
Are you using the same user for running the query and for checking data in InfoProvider, otherwise there might be personal settings difference.
Execute your query in RSRT and check the output.
Regards,
Durgesh. -
Characteristic Value comparison at query level
HI,
I have to identify the invoices as local or upcountry on the basis of below logic.
if 0customer->region & country = 0plant->region & country then the invoice is considered as Local Otherwise it is Upcountry..
How can i do this at query level ?
If i do the same at cube level then if a particular cusotmer's region or country is changed then that will not be reflected in the posted data.
Any help will be appreciated.
ThanksHi,
Use the replacement path to convet the characteristica and use it in formula and compare using IF statement.
Regards,
Jo -
Infoset resulting multiple results at query level
Hi,
I have joined 1 DSO and 1 Infocube in Infoset.. Mapped Plant, Material and Batch
DSO
Plant Material Batch Caldate Qty
P1 M1 B101 01/02/2014 1000
P2 M2 B102 05/02/2014 2000
Infocube
Plant Material Batch Caldate %
P1 M1 B101 02/02/2014 20
P1 M1 B101 05/01/2014 20
P2 M2 B102 07/02/2014 15
I'm considering date only on DSO and ignoring Infocube date. When I execute the report for the month of February, report output is as follows.
Plant Material Batch DSODate Qty %
P1 M1 B101 01/02/2014 1000 40 (Summing up with January Date)
P2 M2 B102 05/02/2014 2000 15
I want data % value to be 20%.
Is there any possibility to change at query level or join level.
If we have one line item, data is correct but not the case with multiple line items.
Kindly do the needful!
Thanks
SSHi,
When you join the two infoproviders in the infoset ignoring infocube date, you are creating as many records for each record in DSO. That means for the first record the infoset creates :
Plant Material Batch Caldate Qty %
P1 M1 B101 01/02/2014 1000 20 (for first row in infocube)
P1 M1 B101 01/02/2014 1000 20 (for second row in infocube)
I also think same as Anshu, you have all the common characteristics, you can as well use a multiprovider.
regards
Yasemin... -
Convert Char as KF at Query Level
Hi,
I have a query will all line Item Details with GI Date details.
But my requirement is the for all line Item details i want the GI date as mentioned for Line Item 10. (i,e First Schedule Line Date) at query level.
Is there any way i can convert the GI date Char to KF and then apply Restriction on Item 10 in Restricted Key Figure.
Is there any other way to archive this at query Level only.
Thanks for your suggestions,
Joseph MHi Joseph,
Probably we could try the following solution
Create two formula variables of replacement path type. - one for line item and one for GI date.
Create a formula with logic - if line item 10 then display actual GI date, else date 01/01/1000 or any date which will be surely smaller than the GI dates available in the system.
In the properties, maintain, calculate result as the highest value.
Then probably you could use SUM(CT) data function for another formula and use the formula we created above.
I am not sure that this will work, but worth giving a try. Else, we would have to accomodate the requirement in the model.
Lastly, do take a look at virtual characteristics and key figure. That might be one option.
Looks like we are reporting on item level, which means we would be dealing with huge data, in such cases virtual characteristic would be too much bearing on performance.
Hope it helps,
Regards,
Sunmit. -
Need to sum max values in a report with Hidden groupings
I have looked all over and have not found my exact situation, so I am posting my first question. I have a report that I have grouped on multiple levels. So my report has a customer/header/detail/release grouping. I have written a custom
expression so that only a single value, which is the max value in the group, is shown in the detail, with all values showing in the release. I have then set my visibility toggle to toggle on header, then detail, then release and I need to sum up those
max values into a field on the report. The custom expression that I have written works correctly when you are showing on the detail level. It gives the correct value, which is the max value in each release.
What I then need the report to do is to sum only that max value and roll that up into the header group, so that I get a total of the max values.
I have tried using the MAX function in my expression to get the correct max value, but I cannot get SSRS 2008 R2 to sum that, and I have tried writing a custom expression that will calculate the max (Non-zero values divided by number of non-zero records) and
both ways work correctly until I try to rollup and sum to the next group level.
I have also tried using a group variable and custom code to get the value and save it to a variable, but I have not had any luck in setting or getting that value correctly back to my report.
At its most basic it feels like I should be able to set a Sum(Max(Fields!ValueColumn.Value) and let SSRS handle how that should be broken out, but after trying that repeatedly I have still had no luck. I cannot adjust the SQL as I need the level of detail
that the report shows, although I could add more fields as long as I don't add any groupings or totals that would reduce the granularity of that data being returned.
Any new avenue to explore would be very helpful.
Thank you in advance,
Chad
Ok, after continuing to search the internet I finally found the extra piece that I was missing that gave me the results I needed. The new expression looks like this:
=runningvalue(Sum(Max(IIF(LEFT(Fields!JobNum.Value,1)="S" AND Fields!Week1STol.Value<>0, CDBL(Fields!Week1STol.Value), 0),"JobItem"),"JobItem"),SUM, "JobItem")
In this I wrapped the original expression of Max in both a Sum and a runningvalue both at the JobItem level to get this rollup value. Now when I open the grouping I get the correct running value at each level.
What this really gives to me is a running total at each of four groupings, even with a "max" value at the detail level. This also allows me to total a max value inline on the report, without needing a hidden row, or report footer.
Thank you to everyone who looked at this, I hope it helps someone else. If this answer is not clear enough, please don't hesitate to add to the comments and I will try to clarify.
Thank you, Chad -
Logical Formula at query level?
I have requirment like if D = 0 then ' ' (SAPCE) else E / F.
I dont know how to get space ?
please help me to create this formula at query level?hi Hari,
I am not really sure ,but u can try this...
if D = 0 then ' ' (SPACE) else E / F.
use the same formula and make it Zero instead of space and then in the Query properties replace Zero with Blank or Space Values.
Rgds
SVU123
Edited by: svu123 on Sep 30, 2010 6:53 AM -
Query level formula is not working for all the amounts
Hi Friends,
In my production system I found new thing that in my query level I done some calculation (as per my requirement I done amount devide by 100 to get correct values)
It is working for all the amounts except 1or 2 amounts, im uploading same source file for all the amountsu2026 why it is happening like this u2026and is there any availability to change those 1 or 2 values at data base tables level or at any pleace (I hope in SAP it is may not possible)u2026can any body tell me why it is happening like this. u2026 because of this issue only my report is pending to sign off u2026.please can any body find the solution ASAP.
Regards,
VENKATAre they non decimal currencies?
If yes, create RKF1 on amount field excluding the currencies for which you are not getting currect values then in CKF or formula as RKF1 / 100. Similarrly create another RKF2 on amount only including the currencies which are excluded in RKF1, create a CKF or formula as RKF2/10000. Then created another formula wich adding CKF1 and CKF2. -
How can i use SUM aggregate in select query?
HI,
GURUS,
How can i use SUM function in Select Query and i want to store that value into itab.
for ex:
TABLES: vbap.
types: begin of ty_vbap,
incluse type vbap,
sum type string,
end of ty_vbap.
data: i_vbap type TABLE OF ty_vbap,
w_vbap type ty_vbap.
SELECT sum(posnr) FROM vbap into table i_vbap up to 5 rows.
(or)
SELECT sum(posnr) FROM vbap into table i_vbap group by vbeln.
loop at i_vbap into w_vbap
" which variable have to use to display summed value.
endloop.
if above code is not understandable pleas give ome sample code on above query.
Thank u,
shabeer ahmed.Hi,
Check this sample code.
TABLES SBOOK.
DATA: COUNT TYPE I, SUM TYPE P DECIMALS 2, AVG TYPE F.
DATA: CONNID LIKE SBOOK-CONNID.
SELECT CONNID COUNT( * ) SUM( LUGGWEIGHT ) AVG( LUGGWEIGHT )
INTO (CONNID, COUNT, SUM, AVG)
FROM SBOOK
WHERE
CARRID = 'LH ' AND
FLDATE = '19950228'
GROUP BY CONNID.
WRITE: / CONNID, COUNT, SUM, AVG.
ENDSELECT.
Regards,
Sravanthi -
Good Afternoon everyone,
data is loaded correctly in my infocube thru flat file.but wen i create query on this provider n drill down on one of the object i see different data then cube(field is 'assigned to' which actually store the person's name who the ticket is assigned to but in query it is showing some data which look as some date in single quotes.ex- '20080101').wat can be possible reson for this?
Regards,
DeepikaHi,
You are trying to see a assignne name but u are getting a date.
Thats only possible if the mappings are wrong(identifications) in multicube or u are giving different restrictions at the cube level and at the query level.
The cube is defenately going to contain the values shown in the report for that infoobject.
Again go through the restrictions and filters in the query.
Query will show whatever is in the cube based on the restrictions.
It will not do the conversions as u have said in your case.
If it is a multicube check for the identifications again in the multicube for this charactritics.
It is possible that update rules are correct but the identification in the multicube is incorrect and assignne is mapped to some date.
Thanks
Ajeet -
Determine Max Value from Lower level?
Hi,
I have requirement to determine maximum value from lower levels. Please post your ideas to resolve this requirement using BEx Query designer.
Level_A1 MAX (KF1 of lower level - B1 to B2 or C11 to C1n + C21 to C2n)
Level_B1 MAX (KF1 of lower level - C11 to C1n)
Level_C11 KF1
Level_C12 KF1
Level_C13 KF1...
Level_C1n KF1
Level_B2 MAX (KF1 of lower level C21 to C2n)
Level_C21 KF1
Level_C22 KF1
Level_C23 KF1...
Level_C2n KF1
Thank you very much
BW UserDid you try @ancestval http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/frameset.htm?ancestval.html
Regards
Celvin
http://www.orahyplabs.com -
Hi
In my query I am unable to average the values in the query is there a way of getting number of records in the query please tell me how to get average values in the query level i went to properties i found the average option but that does not work.
Regards,
Nikhil.Hi Nikhil,
Try with the solution detailed in the following document:
www.service.sap.com/bi --> Product Information Previous Releases --> Media Library --> HOW TO... Guides --> Guide List SAP BW 2.x --> How to... Count the occurrences of a characteristic.
Ciao.
Riccardo. -
Time format is showing wrong at query level
hi,
i have a problem at query level
i have two time fields which are key figures
i have calculated key figure which has a formula
cal kf = time (tim1- tim2)
data at the dso level
flightno time1 time2
f001 11:12:24 10:12:24
f002 11:12:24 10:12:24
f003 10:12:24 10:12:12
f004 11:12:24 11:12:12
query output
flightno time1 time2 calkf
f001 11:12:24 10:12:24 19:00:00
f002 11:12:24 10:12:24 19:00:00
f003 10:12:24 10:12:12 18:00:12
f004 11:12:24 11:12:12 18:00:12
calculated key figure is showing me wrong values by adding up 18 hours
so i added a key figure at dso level and calculated using formula in transformations
it is showing me correct value at dso level but query level it is showing me wrong values
how to solve this
did any one face this problem before
any ideas
i will assign points
Message was edited by:
venkat sVenkat,
Try out this.
Since the 2 time fields are key figures,create the calculated key figure for each of them using the Time() data function.
eg: for tim1 --> create CKF using time data function as TIME(tim1)
eg: fro tim2 --> create CKF using time data function as TIME(tim2)
As a next step,now create a CKG for calculating the diff bewteen 2 time CKG.
eg : TIME(TIME(tim1)-TIME(tim2))
Hope this helps.
Thanks & Regards,
Suchitra.V -
HI Experts,
I need some calculations at query level,
find the below user requirement.
And one more thing we are not authorised to use Customer exits.
SELECT
[FA No] As [FA No],
[FA Description] As [FA Description],
Sum( CASE WHEN [Posting Date] < @fromDate THEN Amount ELSE 0 END) AS [Starting Balance],
Sum( CASE WHEN [Posting Date] >= @fromDate AND [Posting Date] <= @toDate THEN [Debet Amount] ELSE 0 END) AS [Debet Amount],
Sum( CASE WHEN [Posting Date] >= @fromDate AND [Posting Date] <= @toDate THEN [Credit Amount] ELSE 0 END) AS [Credit Amount],
Sum( CASE WHEN [Posting Date] <= @toDate THEN Amount ELSE 0 END) AS [Ending Balance],
Sum( CASE WHEN [Posting Date] >= @fromDate AND [Posting Date] <= @toDate THEN [Amount] ELSE 0 END) AS [Net Change]
FROM FA06data
GROUP BY [FA No], [FA Description]
Please help as early as you can.
Thanks,
NaveenThanks for your responce.
we are using Sql with the query designer.
what we can use? like calculated key figure. -
Hi,
Does the aggregation at query level will not work in BI7.
As i have a key figure with aggregation type summation in backend,there were some similar records when tried to set aggregation at query level it is not working summing the key figures.
Any suggestions.Are you sure there is no exception aggregation defined?
Maybe you are looking for
-
i recently upgraded my iphone 5s to IOS 8.1 , after the upgrade i lost LTE and 4g, connectivity and stuck to 3g, i observed that my phone's got weker signal than before, i have intermittent signal during calls, and dropped calls. i did go to my servi
-
Adobe Acrobat Standard - 22002418 - Lost Media
Need to install Adobe Acrobat Standard 9.0today and client has lost the media. Is there a download to just the media? If not, what is the method to obtain new media? Thank you.
-
When i allowed itunes to be my default, it chanced all the icons on my computer to the itunes symbol, how do I undo this?
-
I'm creating a GUI application in NetBeans, where I'm using jFileChooser object to select a file when a user clicks a button, the filechooser dialog appears and doesn't respond to the user's action but after closing the file chooser using the close b
-
Running VMWare and want Protection
A little help here for a Mac "newbie": I just downloaded XP (SP2) using VMware. Now I'm a bit concerned about protecting my laptop from all the "hazards" of hacking--which is why I made the switch in the first place. Can anyone recommend a good virus