Summation in Cross tab
Dear All,
We are using BO4.1 SP3 with Bex as data source.
I am trying to do summation in cross tab footer which gives total across all the columns of cross tab.
These sum is based on the dimension taken in the header of cross tab. So we are defining the condition in teh where condition.
The definition for summation depends on dimension.
We are using formula: Sum(Measure) Where (Dim = "ABC").
This formula is working correct in case if both the columns have data. In case of one of the column value is Null, its giving result output as Null.
If we are using IsNull then 0 then also it is giving result as Null. Can you please guide how to resolve this issue.
Regards,
Sonal
Hi Sathish,
Have verified above approach, but not working. Please let me know in case of any other logic.
Regards,
Sonal
Similar Messages
-
Hi All,
I have a cross tab report which has 4 measures. I have to aggregate 3 of them and I dont want to aggregate 4th because it is percentage of seats occupied. Either i can aggregate all 4 measures or none. Any Idea how to solve this problem?
Thanks.
PayalHi,
I need to use both Summation and Average while calculation the "Total" values. I believe I would have to specify and if condition stating when the cost element (which is in the rows) is like headcount, total = average else total = summation.
However, I do not know how and where can I specify such a condition.
Kindly advise.
Thanks -
Sub-Summarizing columns in Cross Tab
Post Author: valkyriexp
CA Forum: General
Hi,
I'm fairly new in using CR, I wonder if anyone could help me.
I have a cross tab report of projects in rows, activities in columns and hours in table, i need to insert few new columns that have the sum of hours of the selected activities. Is that possible without breaking the report into sub-reports?
some thing like
Act1 Act2 Sum1&2 Act3 Act4 Act5 Sum3&4&5 .....
Proj1 1 1 2 4 2 1 7
Proj2 2 1 3 1 0 0 1
thanks for the helpPost Author: valkyriexp
CA Forum: General
After spending half a day i was able add a new field to each column to does the job, small piece of macro is doing the summation, now i have the problem to set the width of empty fields to zero, can anyone help?
WhileReadingRecords;global NumberVar sumnum;global StringVar OutStr;
if {jobs.acts}="Act1" or {jobs.acts}="Act3" then sumnum:={jobs.hour}else if {jobs.acts}="Act2" or {jobs.acts}="Act4" or {jobs.acts}="Act5" or ... then sumnum:=sumnum+{jobs.hour}else sumnum:=0;
if {jobs.acts}="Act2" or {jobs.acts}="Act5" then OutStr:=cstr(sumnum);else OutStr:="";
the result would be like the following table, now i need to set the width of empty fields to zero:
Act1 Act2 Act3 Act4 Act5 .....
Proj1 1 1 2 4 2 1 7
Proj2 2 1 3 1 0 0 1 -
Suppressing levels in cross tab.
Hello All,
I have a project requirenment for one of the client and currently using CR 2008 for creating dynamic reports based on a finance database for profitabilty Analysis. I have been using lot of Web-Elements functionality in my crystal application and its going good to an extent, the only issue i have been experiencing is the dynamic change of the cross tab data based on prompts.
Its a 4 level application where in users are prompted to select a specific level outta the 4 levels, they can select either few or all. Now, the issue is, in my cross tab i have mentioned all the 4 levels in my row field and the data is displayed according to the users selection through prompts, it works fine. But however if user does not select level 3 or 4 or any one of them then the specific cross tab row is displayed empty. I have tried selecting the option suppress empty rows under customize tab but that doesnt seem to work.
I want only those levels to be displayed which are selected by users and suppress the rest, the empty rows in cross tab looks kinda odd to see. I am unable to figure out the formula string for the same.
Any help will be appreciated. Thank youHi
Cross tab is nothing but a tabular representation of data.
It displays zero values only when there is no data for the combination of corresponding row and column.
We can not suppress this however we can display some string like "No data for this" or something else as per requirement.
For this, do the below:
- Right click on the summary value field on the cross tab -> Format Field.
- Under Common Tab, click on X-2 for Display string. This would open the formula editor.
- Put the below formula there:
if IsNull(summary database field) then "No data for here"
else "" & currentfieldvalue;
You can change the display string as per requirement.
Hope this helps!!
Regards
Sourashree -
"Can Grow" property on Cross-Tab object can not be unlock
I am using Crystal Reports XI. My report uses a Cross-Tab object via SQL server. I am having problem making my data column (Field Row) to increase dynamically in height when my data size increases. Since the "Can Grow" property in the Format Editor is locked, it would not let me set the "Can Grow" to true to enable this function. How do I unlock the "Can Grow" function so I can set it to true?
The only other option I can think of would be to build a virtual cross tab, but in many cases, especially when the number of 'column' values is dynamic, this is not possible.
-
BI Publisher Pivot Table or Cross Tab
Hai All,
I have a doubt in developing a Matrix report in XML. I have developed a matrix report in RDF and the output is coming fine in RDF. I have generated the XML file which looks like this. I need to develop the report which displays employee details followed by the allowance which are dynamic.
- <XXHRPRF>
- <LIST_G_SUMRESULT_VALUE>
- <G_SUMRESULT_VALUE>
- <LIST_G_EMPLOYEE_NUMBER>
- <G_EMPLOYEE_NUMBER>
<EMPLOYEE_NUMBER>100026</EMPLOYEE_NUMBER>
<PERSON_ID>80</PERSON_ID>
<NATIONALITY>USA</NATIONALITY>
<NATIONAL_IDENTIFIER />
<UNIFIED_ID />
<FULL_NAME>Thomas H Mathew</FULL_NAME>
<ORGANIZATION_NAME>Corporate Affairs</ORGANIZATION_NAME>
<PENSION_FUND_ID />
<CS_SNO>1</CS_SNO>
<CF_PENSION_CONTRIBUTION>3637.5</CF_PENSION_CONTRIBUTION>
<CP_PENSION_COMP_CONTR>10912.5</CP_PENSION_COMP_CONTR>
<CP_TOTAL_SALARY>72750</CP_TOTAL_SALARY>
<CF_TOTAL_CONTRIBUTION>14550</CF_TOTAL_CONTRIBUTION>
- <LIST_G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>1</TAG>
<ELEMENT_NAME>Basic Salary</ELEMENT_NAME>
- <LIST_G_PERSON_ID>
- <G_PERSON_ID>
<RESULT_VALUE>39650</RESULT_VALUE>
</G_PERSON_ID>
</LIST_G_PERSON_ID>
</G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>2</TAG>
<ELEMENT_NAME>Housing Allowance</ELEMENT_NAME>
- <LIST_G_PERSON_ID>
- <G_PERSON_ID>
<RESULT_VALUE>25000</RESULT_VALUE>
</G_PERSON_ID>
</LIST_G_PERSON_ID>
</G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>3</TAG>
<ELEMENT_NAME>Child allowance</ELEMENT_NAME>
<LIST_G_PERSON_ID />
</G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>4</TAG>
<ELEMENT_NAME>Social allowance</ELEMENT_NAME>
- <LIST_G_PERSON_ID>
- <G_PERSON_ID>
<RESULT_VALUE>700</RESULT_VALUE>
</G_PERSON_ID>
</LIST_G_PERSON_ID>
</G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>5</TAG>
<ELEMENT_NAME>Excess Allowance</ELEMENT_NAME>
<LIST_G_PERSON_ID />
</G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>6</TAG>
<ELEMENT_NAME>Additional</ELEMENT_NAME>
- <LIST_G_PERSON_ID>
- <G_PERSON_ID>
<RESULT_VALUE>7400</RESULT_VALUE>
</G_PERSON_ID>
</LIST_G_PERSON_ID>
</G_ELEMENT_NAME>
</LIST_G_ELEMENT_NAME>
</G_EMPLOYEE_NUMBER>
- <G_EMPLOYEE_NUMBER>
<EMPLOYEE_NUMBER>100030</EMPLOYEE_NUMBER>
<PERSON_ID>82</PERSON_ID>
<NATIONALITY>Canada</NATIONALITY>
<NATIONAL_IDENTIFIER />
<UNIFIED_ID />
<FULL_NAME>Sara Wilson</FULL_NAME>
<ORGANIZATION_NAME>Human Resources</ORGANIZATION_NAME>
<PENSION_FUND_ID />
<CS_SNO>2</CS_SNO>
<CF_PENSION_CONTRIBUTION>1203.75</CF_PENSION_CONTRIBUTION>
<CP_PENSION_COMP_CONTR>3611.25</CP_PENSION_COMP_CONTR>
<CP_TOTAL_SALARY>316575</CP_TOTAL_SALARY>
<CF_TOTAL_CONTRIBUTION>4815</CF_TOTAL_CONTRIBUTION>
- <LIST_G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>1</TAG>
<ELEMENT_NAME>Basic Salary</ELEMENT_NAME>
- <LIST_G_PERSON_ID>
- <G_PERSON_ID>
<RESULT_VALUE>19600</RESULT_VALUE>
</G_PERSON_ID>
</LIST_G_PERSON_ID>
</G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>2</TAG>
<ELEMENT_NAME>Housing Allowance</ELEMENT_NAME>
- <LIST_G_PERSON_ID>
- <G_PERSON_ID>
<RESULT_VALUE>22500</RESULT_VALUE>
</G_PERSON_ID>
</LIST_G_PERSON_ID>
</G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>3</TAG>
<ELEMENT_NAME>Child allowance</ELEMENT_NAME>
- <LIST_G_PERSON_ID>
- <G_PERSON_ID>
<RESULT_VALUE>600</RESULT_VALUE>
</G_PERSON_ID>
</LIST_G_PERSON_ID>
</G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>4</TAG>
<ELEMENT_NAME>Social allowance</ELEMENT_NAME>
- <LIST_G_PERSON_ID>
- <G_PERSON_ID>
<RESULT_VALUE>800</RESULT_VALUE>
</G_PERSON_ID>
</LIST_G_PERSON_ID>
</G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>5</TAG>
<ELEMENT_NAME>Excess Allowance</ELEMENT_NAME>
<LIST_G_PERSON_ID />
</G_ELEMENT_NAME>
- <G_ELEMENT_NAME>
<TAG>6</TAG>
<ELEMENT_NAME>Additional</ELEMENT_NAME>
- <LIST_G_PERSON_ID>
- <G_PERSON_ID>
<RESULT_VALUE>3075</RESULT_VALUE>
</G_PERSON_ID>
</LIST_G_PERSON_ID>
</G_ELEMENT_NAME>
</LIST_G_ELEMENT_NAME>
</LIST_G_EMPLOYEE_NUMBER>
</G_SUMRESULT_VALUE>
</LIST_G_SUMRESULT_VALUE>
<CF_PERIOD>MAR-2009</CF_PERIOD>
- <XXHRPRF>
I need to develop a cross tab format in RTF using template builder. Can we get this in matrix report using the standard wizard given in template builder or else it should be done manual. If it can be done through wizard can u please explain the process.
And one more think what is the latest version of template builder available. In few cases its given as pivot table and in few its given as cross tab. I confused by that.
This seems to be basic doubt, but please guide me.
Regardsi,
I am developing cross tab report with group in BI Publisher(i.e matrix with group above report in report builder).
My req.is
Country1
region1 region2 region3 --- (level1 column)
d1 d2 d3 d1 d2 d3 d1 d2 d3 --(level2 column)
Row1 10 15 18 24 38 40 36 35 78 --data
Row2 -- -- -- --- --- -- - -- -- --
regions(level1 columns) and d1,d2,d3(level2 columns) are data depenent on XML data.
d1,d2 d3 may change in number based on data.Also we have page break on country.
We could able to achieve in report builder but in Bi Publisher we are unable to achieve the same.
Wizard in BI Publisher gives only one level of measure(region) only.
Currently we are using BI Publisher template builder version 10.1.3.2.1
Need help in this regard ASAP.
Thanks in advance. -
Is there a limit to no. of summary fields that can be used in a cross tab?
Hi,
While creating a cross tab is there a limitation to number of summarized fields that can be used?
- The cross tab when uses 184 fields as summary fields leads to Crystal report application to crash at the time of export to excel.
- Tried with two Datasources: XML and excel
- If we reduce the number of summary fields used to 102 exactly, export works fine in excel.
- If 2 cross tabs are used each containing 92 summary fields(in order to show 184) export to excel works fine.
Please let me know if there is any such limitation which leads to CR application to crash when exporting in excel?
Thanks
Regards,
NidhiI suggest you purchase a case and have a dedicated support engineer work with you directly:
http://www.sdn.sap.com/irj/boc/gettingstarted
Or
http://store.businessobjects.com/store/bobjects/Content/pbPage.CSC_map_countyselector/pgm.67024400?resid=jFmmLgoBAlcAAALO-iYAAAAP&rests=1278687224728
If this is a bug you'll get a refund, if not post your enhancement request in the Idea Place. Or the Rep will suggest a better way to create your report. -
Crystal Report Cross Tab Report
In crystal report 2008, i created a cross tab report. Column shows sales order number and rows show item number.
For columns that shows sales order #, I also wanted to show sales person name field right beside it. In cross tab expert, I added the field salesperson name.
However, crystal cross tab shows the sales person at a separate column with duplicate information. I only want to show sales order no. with sales person name under one column. Is there a way to achieve this? Thanks.This would be a hard job.
Have you tried Pivot Table function in Excel? You can play with it and get some ideas.
Thanks,
Gordon -
How to get the last "reported" value in a cross tab
Dear all,
based on a BeX Query Universe I have built a report with a cross tab in webI.
Maybe you can help me with the following issue. There I have a problem: I want to get in the Total-column always the last reported value, e.g. for Number Total Customers "66", not for Mar or Apr, because they are null.
Calendar Month |Jan| |Feb| |Mar| |Apr| |Total|
Number Total Customers |54| |66| | | | | 66
Number Active Customers |57| |71| | | | | 71
I hope that you understand my problem and could help as soon as possible.
Thanks a lot in advance for your support.
Best regards.
Edited by: HOLWUE on Feb 8, 2010 1:40 PMHi,
If this question is related to Webi then post in the below forum.
http://scn.sap.com/community/businessobjects-web-intelligence/content?filterID=content~objecttype~objecttype[thread]
Regards,
Sujit. -
Cross-Tab Report export to Excel
I have a cross-tab report that I need to export to excel and keep the same formatting. When I export the report the first column is Part # the next is operation #. The report is grouped on Part number, but each part may have multi operation. When I look at the report in Crystal or as a PDF the part # is at the top then each operation is a seperate row that follows. When I export it to excel it works fine but instead of the part # appearing at the top then follow by each operation the part number ends up on the last operation in the list. How can I export this and keep the format the same? by the way I have tried both xls data only and xls 2007 options
Hello Experts,
I also tried to export the CR cross tab report in Excel Data only format.
Also I want to display Row label i.e. my Rows are different dates so I created a text field and named as Date & Time but when export it to Excel Data Only, the date time label appears 1 row above then rest of the columns. It works good while looking on InfoView but export messed it up.
Can you please suggest. -
Showing Null values in Cross-tabs
Post Author: merv
CA Forum: Charts and Graphs
I've created a cross-tab report but I will like for the report to list the rows will null values as well as the rows with values. I need to do this because I cannot create one cross-tab with all of the necessary fields, so Iu2019ve created 3 cross-tabs and placed them side by side. Or is it possible to link the cross-tabs. Thanks
I would like to see the following
Total
A
A-
A+
B
B-
B+
C
C-
C+
D
Total-1
Total-2
Canada
MATH30800
24
12
0
0
4
0
4
0
0
0
0
Canada
MATH30800
24
Canada
MATH30800
0
Nigeria
MATH201
12
8
2
2
0
0
0
0
0
0
0
Nigeria
MATH201
0
Nigeria
MATH201
12
Poland
CHEM31800
8
0
1
0
0
0
3
1
0
0
0
Poland
CHEM31800
8
Poland
CHEM31800
8
Puerto Rico
MATH190
0
0
0
0
0
0
0
0
0
0
0
Puerto Rico
MATH190
1
Puerto Rico
MATH190
0
Panama
ENGR10300
39
3
4
1
2
4
6
3
3
0
1
Panama
ENGR10300
0
Panama
ENGR10300
39
Romania
MATH31601
4
2
1
0
0
0
0
0
0
0
0
Romania
MATH31601
4
Romania
MATH31601
0
Afghanistan
EAS10600
11
0
4
0
0
1
1
1
0
0
0
Afghanistan
EAS10600
0
Afghanistan
EAS10600
11
Bahamas
HS-COURSE
0
0
0
0
0
0
0
0
0
0
0
Bahamas
HS-COURSE
27
Bahamas
HS-COURSE
0
Brazil
HS-COURSE_2
1
0
0
0
0
0
1
0
0
0
0
Brazil
HS-COURSE_2
0
Brazil
HS-COURSE_2
1
instead of what's bellow
Total
A
A-
A+
B
B-
B+
C
C-
C+
D
Total-1
Total-2
Canada
MATH30800
24
12
0
0
4
0
4
0
0
0
0
Canada
MATH30800
24
Nigeria
MATH201
12
Nigeria
MATH201
12
8
2
2
0
0
0
0
0
0
0
Poland
CHEM31800
8
Poland
CHEM31800
8
Poland
CHEM31800
8
0
1
0
0
0
3
1
0
0
0
Puerto Rico
MATH190
1
Panama
ENGR10300
39
Panama
ENGR10300
39
3
4
1
2
4
6
3
3
0
1
Panama
ENGR10300
0
Afghanistan
EAS10600
11
Romania
MATH31601
4
2
1
0
0
0
0
0
0
0
0
Romania
MATH31601
4
Brazil
HS-COURSE_2
1
Afghanistan
EAS10600
11
0
4
0
0
1
1
1
0
0
0
Bahamas
HS-COURSE
27
Brazil
HS-COURSE_2
1
0
0
0
0
0
1
0
0
0
0Post Author: azanobrown
CA Forum: Charts and Graphs
What I've done in the past is create a new formula for your "value" field similar to this and put it in your cross-tab:if {original value field} is "" then [0] else {original value field}the purpose is to create a record value (e.g. 0) where there is no record. I hope that this helps. -
Date Format is not Working in Cross tab Crystal report 2008
Hi,
I have developed an application ASP.Net c#
in Framework 3.5 with crystal report 2008 with service pack 5.
in my crystal i used cross tab to show the grid records. one of the data having the data type as date time after launching the report, when i export the report with option "export to excel (data only)" and check the format of the date value in excel it show the general string
if i place that data in any other location other than cross tab then it reflects the format what i give in report design. but when the control is in cross tab
its not effect
how to solve this!And tweeted
- Ludek
Senior Support Engineer
AGS Product Support, Global Support Center Canada
Follow us on Twitter -
Hi I have created a cross-tab report using only two fields. enrollment_id and create_date. What is needed is a count of the # of enrollments and a summary for the week starting on Sunday. I have been able to do this however, they only want for the previous 4 weeks - I am returning all weeks since the start. I am not sure where to filter. Here is what I used in a regular report which worked but is not working in the cross-tab. The formula below gives me up to the last 4 weeks sunday to today.
not ({ISSUANCE.CREATE_DATE}in Last4WeeksToSun) and
not ({ISSUANCE.CREATE_DATE} in WeekToDateFromSun)
Here's what it should look like and includes a count up to today for week of 11/30.
Site_name 11/02/08 11/09/08 11/16/08 11/23/08 11/30/08
#issued 25 29 16 18 15
Any help would be appreciated.I figured this one out....needed to take out "not"
-
I have a cross-tab report that lists dates as headers and employees as rows. The data at every cell shows the qty (it is like timesheet report). The totals are shown for every row and column. The report layout looks something like this:
----------- <date> <date> <date> .... <Total>
<name> <qty> <qty> <qty> <qty>
<name> <qty> <qty> <qty> <qty>
<name> <qty> <qty> <qty> <qty>
<Total> <qty> <qty> <qty> <qty>
The report definition looks like this (I numbered the columns to make it easier to write about them):
01: <?horizontal-break-table:1?>
02: <?for-each-group@column:EMPLOYEE_TIME;./TRANSACTION_DATE?><?sort:TRANSACTION_DATE;'ascending';data-type='date'?>
03: <?TRANSACTION_DATE?>
04: <?end for-each-group?>
05: <?for-each-group:EMPLOYEE_TIME;./EMPLOYEE_NAME?><?sort:EMPLOYEE_NAME?><?variable@incontext:G1;current-group()?>
06: <?EMPLOYEE_NAME?>
07: <?for-each-group@cell://EMPLOYEE_TIME;./TRANSACTION_DATE?>
08: <?sum ($G1[(./TRANSACTION_DATE=current()/TRANSACTION_DATE)]/TRANSACTION_QTY)?>
09: <?end for-each-group?>
10: <?sum ($G1/TRANSACTION_QTY)?>
11: <?end for-each-group?>
12: <?variable@incontext:T;.//EMPLOYEE_TIME?>
13: <?for-each-group@cell://EMPLOYEE_TIME;./TRANSACTION_DATE?>
14: <?sum (current-group()/TRANSACTION_QTY)?>
15: <?end for-each-group?>
16: <?sum ($T/TRANSACTION_QTY)?>
The XML data is not sorted in any way and the report sorts it by employee and date. As you see at the line 02 I applied the sort by the transaction date. The sort works as expected, however the actual QTY are not showing at correct cells. If I remove sort it works fine but the dates are in random order. I suspect it is because I sort transaction date at header level and the QTY is not aware about it. I tried to apply the sort at line 07 but it does not help.
Does anyone has any idea how to get this report to display data correctly?I have a SR which has associated bug 6131270.
Here is the latest from my SR:
UPDATE
=======
Hi Tomas,
The bug has been updated. Development has recommended
"You also need the patch from bug 4332399 to solve the java.util.EmptyStackException. "
Please review above bug if you have access.
Please consider applying Patch 4332399 - XSL:SORT FAILED IN A 2 LEVEL XSL:FOR-EACH-GROUP CASE
Backport is included in patch 5840358 for EBS customers. -
How to count number of columns in cross-tab report
I have created a cross-tab report and have managed to get the data out as below:
Jan Feb Mar....(display of months will auto expand) Avg/Mo Total
UserA 4 3 4 11
UserB 6 1 1 8
UserC 5 5 5 15
Total 15 9 10 33
I want to insert a calculated column (Avg/Mo) into the cross-tab report based on the formula: Total/Number of Months. I used this calculation formula for Avg.Mo column:
(GridValueAt(CurrentRowIndex, CurrentColumnIndex+1, CurrentSummaryIndex)/GetNumColumns)
However, I get the wrong average since GetNumColumns count the total number of columns including the column of Avg/Mo and Total.
How do i get the number of columns, excluding the Avg/Mo calculated column and Total column?
PS: I can't use hardcode since the number of months/columns will auto expand the months progress...
Edited by: jutamind on May 26, 2010 9:27 AMok managed to solve this by slightly changing the formula:
GridValueAt(CurrentRowIndex, CurrentColumnIndex+1, CurrentSummaryIndex)/(GetNumColumns-2)
Maybe you are looking for
-
Hi, I need to block the PO output to vendor when certain fields are changed in PO. Can you let me know whether there's any BADi for this where in I can put my conditions. I guess the BADi BBP_TRIGGER_EXECUTED will do. Kindly provide some inputs on th
-
Logging Best Practices in J2EE
Hi, I've been struggling with Apache Commons Logging and Log4J Class Loading problems between module deployments in the Sun App Server. I've also had the same problems with other App servers. What is the best practice for Logging in J2EE. i.e. I thin
-
Hi how to order iPhone 5 with delivery to Russia
hi how to order iPhone 5 with delivery to Russia???
-
Copying an environment between servers
I am looking for instructions on copying my production environment to my Development server as an archive environment. Is there a way to use the BPC Administrator to do this or is using the backup/restore process in the BPC server manager (which by t
-
Updating a Multi Entity view object to add row only to child entity
I have a View object VO1 made of multiple entities e.g. EO1 and EO2 which have a composition association with cardinality 1 is to many EO1 being the entity corresponding to parent table and EO2 is the child table. All the entities in the association