Cross-Tab Conditional Formatting
Hello Everyone
I have a question, I am working with on a cross-tab table version 2008 that requires a dollar symbol in some of the columns, but not all of them. I tried to fix this problem with a conditional formula, but for those columns that are calculated members, it does not work. Any ideas? Your help will be greatly appreciated.
In Format Field -> Common there is a formula called Display String. Use this to output the exact string that you want to display in the report. Perhaps something like (basic syntax):
if GridRowColumnValue("Group 1") = "Sales" then
formula = "$" + cstr({CurrentFieldValue, "0.00")
else
formula = cstr(CurrentFieldValue, "0")
end if
which will show something like $123.45 in the Sales column, or 123 in the Qty column...
HTH,
Carl
Similar Messages
-
Cross-Tab - conditional suppression and formatting
I have a cross-tab report of "widgets" sold. There are $10 widgets, $20 widgets, and $50 widgets. All widgets will always cost some round dollar amount, never anything like $10.99. My report shows weekly, month-to-date, and year-to-date sales for each widget denomination by both count and total amount by state. For example:
$10 $20 $50
count amount count amount count amount
New York
Week 5 $50 4 $80 1 $50
MTD
YTD
Delaware 1 $10
etc.
I also have totals by row, along with mark-up amounts (11% of gross sales amounts) and net sales (gross - mark-up). These last 3 columns are included in my dataset, not calculated in the cross-tab.
My problem is that I can't figure out how to do 2 things:
1. the count columns for mark-up and net will always be blank, so I want to suppress the "count" column header
2. I want to display the dollar amounts for those 2 columns with 2 decimal places, but the other amounts with no decimals.
Can this be done, and if so, how?
Thanks!
PhilHi Phil,
I also found the following information under Cross-tab Help for suppressing rows or columns. I hope this is what you're looking for. Sylvie
To suppress empty rows and columns
Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
The Cross-Tab Expert appears.
Click the Customize Style tab.
Select either the Suppress Empty Rows or Suppress Empty Columns check box.
Click OK.
Now, when you print the report, empty rows and/or columns will not appear.
To suppress row and column grand totals
Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
The Cross-Tab Expert appears.
Click the Customize Style tab.
Select either the Suppress Row Grand Totals or Suppress Column Grand Totals check boxes.
Click OK.
To suppress subtotals and their labels
If you have more than two groups in your Cross-Tab you can suppress the subtotal and label for one of them.
Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
The Cross-Tab Expert appears.
Click the Customize Style tab.
Click the field whose subtotal you want to suppress.
The Suppress Subtotal and the Suppress Label check boxes become active.
In the Group Options area, select the Suppress Subtotal check box.
Click the Suppress Label check box to suppress the label associated with subtotal.
Click OK. -
Cross tab template Formatting. Two Row Groups cannot be on the same line
Hi
I have a cross tab template(Vetsriselvan favor) where it has Multiple Row groups. In the RTF template I want them to be on the same line but somehow it works only if they are one below the other. In this template Comp is the First Group Row then Acct is 2nd Group Row and Expense is the 3rd Group Row. Period is the Column. I want all the Group rows start from the same line instead one below the other. Is it possible to do it?
Comp Acct Expense Period
<?for-each-group:/BIOFASPRJ/LIST_G_SUMDEPR1PERACCT/ <[?for-each-group@column:G_PERIOD_NAME[./PERIOD_NAME!=''];PERIOD_NAME|mailto:?for-each-group@column:G_PERIOD_NAME[./PERIOD_NAME!=''];PERIOD_NAME]?>
G_SUMDEPR1PERACCT/LIST_G_COMP_CODE/G_COMP_CODE;./COMP_CODE?> F_comp
<?for-each-group:./LIST_G_ACCT/G_ACCT [LIST_G_DESCRIPTION/G_DESCRIPTION/LIST_G_PERIOD_NAME/G_PERIOD_NAME/LIST_G_DEPR1/G_DEPR1];ACCT?> <?variable@incontext:G1;current-group()?>acc
<?for-each-group:./LIST_G_DESCRIPTION/G_DESCRIPTION[LIST_G_PERIOD_NAME/G_PERIOD_NAME/LIST_G_DEPR1/G_DEPR1];DESCRIPTION?><?variable@incontext:G2;current-group()?>accUpload the template here
http://apps2fusion.com/forums/viewforum.php?f=60
or
Send me the template and xml to fusionDOTobjectATgmail.com -
Conditional Format in Cross-Tabs
Hello,
i have a problem with conditional formatting in cross-tabs(Word-Template-Builder)
My Cross-Tab looks like:
+++++++++++++++++++ColumnHeader1
+++++++++++++++++++ColumnHeader2
+++++++++++++++++++ColumnHeader3
RowHeader 1 | Row Header 2 | Data
First Problem: If "Row Header 2" has a certain value, the whole row should have a different background-color or borderthickness should be different
-i tryed it at "Row Header 2" with +<?if@row:...?><?attribute@incontext:background-color;'lightgrey'?><?end if?>+ but this will only effect the background-color of "RowHeader 1" and outside of the cross-tab. Formatting font-style works fine with this solution.
Second Problem: Similar to first problem. If "ColumnHeader3" has a certain value, the whole column should have a different background-color or borderthickness.
-i tryed it at "Column Header 3" with +<?if:...?><?attribute@block:background-color;'lightgray'?><?end if?>+ but this will only effect the background-color of "ColumnHeader 3".
In case i have to do the conditional formatting at cell ("Data"), how can i address the fields "columnHeader3"/"RowHeader 2" in the if-clause?
Thanking you in anticipation.drop me mail to MY id in Profile Location, with template and xml.
i can help. -
Cross Conditional format in Pivot Table
Hi Guys
I have an important client requirement where by I need to present the data in teh following format
CAMBODIA LAOS SRI LANKA
KPI_NAME PROPOSED_TARGET_VALUE MIN_TARGET_VALUE Aug-09 Sep-09 Oct-09 Aug-09 Sep-09 Oct-09 Aug-09 Sep-09 Oct-09
SERVICES PROVISIONING CALL RATE (%) <5% <5% 21.00% 68.00% 10.80% 1.300% 0.100% 1200.% 2.500% 5.000% 66.50%
The table is like that :
Measure Indicator
13 38 White
17 1016 Red Green
15 3456 White
19 8644 Grey
12 41605.886 White
10 52647.007 White
This is possible only through pivot table whereby country and period dimesions have been put in pivot.
Also there is a requirement to paint the background colour in Red Amber Green ... and for that I ahve to create a new column where after comparing i can put the status as Red ..Amber ..Green and based on the cross column conditional formating I can paint the fact value like 21.00% (shown above) .
But when I am importing that table in pivot view all the backgrounf colour vanishes. since cross column conditional formating is not supported in pivot.
Is there any way out to achieve this requirement .
Thankshttp://oraclebizint.wordpress.com/2008/04/29/oracle-bi-ee-101332-conditional-formatting-based-on-multiple-character-columns-in-a-pivot-table/
-
Conditional Formatting between dates usng a different cell
I need to make it so a cell will change color if the column header is between 2 dates.
Cell D7 = 05/20/2014
Cell E7 = 06/20/2014
Cells F6 - AS6 = 05/19/2014 - 06/27/2014 (column headers)
Cells F7 - AE7= Random Numbers between 5-100 (for now)
So if the date in Cell F6 is inbetween D7 and E7 I want the number in cell F7 to change colors. Is this possible without VB?
Thanks Again!!Hi,
According to your description, I try to make a sample, is this you want?
If it was, please see the steps:
Click Home tab>Conditional Formatting >New Rule>Use a formula to determine which cells to format > Add the formula "=AND(F$6>=$D$7,F$6<=$E$7)"
If I misunderstand something, please upload a sample Excel file through One Drive, I'll try again.
Regards,
George Zhao
TechNet Community Support -
Conditional Formating Issue - Cross Tab
Hi all,
I'm trying to create a cross tab with some conditional formating of background colour..
eg
i have a background formula of:
if {@concat} like "*1" then crGreen else
if {@concat} like "*2" then crYellow else
if {@concat} like "*3" then crRed
my cross tab looks like:
Subject
Name {max of concat}
But when previewed its not displaying colours correctly eg:
Art English Maths
Joe Blogs ??1 ??2 ??3
Art result should be highlighted GREEN
English result should be highlighted YELLOW
Maths result should be highlighted RED
Instead every subject result is GREEN? Has anyone seen this before? Have any ideas to resolve ?
Thanks Again,
SlashABSOLUTE GENIUS. Works like a charm!!
Many Thanks,
Slash. -
Help on conditionally Formatting Field in a Cross Tab
Hi all,
I like to conditionally format a number field in a cross tab, ie. on a certain column the number should show 2 decimal places, otherwise no decimal places. I have tried a formula in the Decimals of the Format Field, If {Command.COL_TITLE}= "G"
Then
2
else
0.
Column G is the one that is to display the number in 2 decimal places. The formula runs, but it never {Command.COL_TITLE}= "G" is never true, ever. COL_TITLE is the columns of the Cross Tab.
Any ideas ?
Thanks
AustinAustin,
If you are trying to format a column then try using the GridRowColumn function.
In the Customize Style tab highlight the column field and check what the alias for formula is. Then format the decimal places for the summarized field with a formula similar to the following;
If GridRowColumn("Alias for formula value") = "G" then 2 else 0 -
PeopleSoft XMLP : Conditional Formatting for Cross tab report
I have developed a XMLP cross tab report using ps query. Report runs good for (.htm,pdf,rtf) extension . But I am unable to format the data based on condition.
Code which get displayed at the data field : <?sum ($G1[(./DESCR=current()/DESCR)]/JOB_REQ_NBR)?>
any help ot suggestion ?
Report layout(table) in .rtf format
H GDESCR*E* Total (Header Row)
GXLATLONGNAME G999*E* 999*E*
CTotal G999*E* 999<?xml version="1.0" ?>
- <query numrows="10" queryname="HF_EREC_BU_JOBREQCOUNT" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="">
- <row rownumber="1">
<XLATLONGNAME>XLATLONGNAME sample data</XLATLONGNAME>
<DESCR>DESCR sample data</DESCR>
<JOB_REQ_NBR>JOB_RE</JOB_REQ_NBR>
</row>
- <row rownumber="2">
<XLATLONGNAME>XLATLONGNAME sample data</XLATLONGNAME>
<DESCR>DESCR sample data</DESCR>
<JOB_REQ_NBR>JOB_RE</JOB_REQ_NBR>
</row>
- <row rownumber="3">
<XLATLONGNAME>XLATLONGNAME sample data</XLATLONGNAME>
<DESCR>DESCR sample data</DESCR>
<JOB_REQ_NBR>JOB_RE</JOB_REQ_NBR>
</row>
- <row rownumber="4">
<XLATLONGNAME>XLATLONGNAME sample data</XLATLONGNAME>
<DESCR>DESCR sample data</DESCR>
<JOB_REQ_NBR>JOB_RE</JOB_REQ_NBR>
</row>
- <row rownumber="5">
<XLATLONGNAME>XLATLONGNAME sample data</XLATLONGNAME>
<DESCR>DESCR sample data</DESCR>
<JOB_REQ_NBR>JOB_RE</JOB_REQ_NBR>
</row>
- <row rownumber="6">
<XLATLONGNAME>XLATLONGNAME sample data</XLATLONGNAME>
<DESCR>DESCR sample data</DESCR>
<JOB_REQ_NBR>JOB_RE</JOB_REQ_NBR>
</row>
- <row rownumber="7">
<XLATLONGNAME>XLATLONGNAME sample data</XLATLONGNAME>
<DESCR>DESCR sample data</DESCR>
<JOB_REQ_NBR>JOB_RE</JOB_REQ_NBR>
</row>
- <row rownumber="8">
<XLATLONGNAME>XLATLONGNAME sample data</XLATLONGNAME>
<DESCR>DESCR sample data</DESCR>
<JOB_REQ_NBR>JOB_RE</JOB_REQ_NBR>
</row>
- <row rownumber="9">
<XLATLONGNAME>XLATLONGNAME sample data</XLATLONGNAME>
<DESCR>DESCR sample data</DESCR>
<JOB_REQ_NBR>JOB_RE</JOB_REQ_NBR>
</row>
- <row rownumber="10">
<XLATLONGNAME>XLATLONGNAME sample data</XLATLONGNAME>
<DESCR>DESCR sample data</DESCR>
<JOB_REQ_NBR>JOB_RE</JOB_REQ_NBR>
</row>
</query> -
Conditionally Format Cross Tab Field
I have a cross tab report that I want to conditionally format text color if row# 5 meets my criteria. Below is the formula I am trying in the Format Field editor.
if {@Type} = "8=POH"
then crred
(I have also tried adding the else statement.....else crblack)
I get no results when I try this. I can change the text color via the formatting toolbar, but this changes all data in all 6-8 rows.
Is there another method to conditionally format the row, or is it just not possible?
ThanksI just learned this yesterday, so here goes.
In the suppresion formula for the column total, enter the following expression:
numberVar x:=0;
False;
This is going to reset the row count for each column
Then in the suppression formula for the summary field, enter the following expression:
numberVar x := x + 1;
False;
And in the font color conditional formual, use the following expression:
numberVar X;
if (X = 5) and ({@Type} = "8=POH") then crRed else crNoColor;
This should give you a red 5th row if the type condition is met
Fuskie
Who cautions that he does not know what the {@Type} formula contains and that it might need to be modified to be used in this context... -
Conditional format in cross tab
Post Author: RobotSlave
CA Forum: Charts and Graphs
Hello All
Crystal 2008 12.0.0.549
I have a crosstab report in that repeats in each GF1 that displays values for several variables over an eleven month span, for instance a shortened data set might look like this:
FEB MAR APR MAY ....
Claims 1233 876 666 888 ....
sold 987 987 7 7 8 888 ...
etc...
I want to display conditional formatting such that if a value in the claims row is over 800, make the font RED for that column only. When I use a conditional formatting formula in the format editor font dialog, it makes the whole row red, when the values clearly do not all meet the required "800". I have experimented with making certain my value is a number and not a string, and I'm stymied. Does anyone have any input?Post Author: rsvn
CA Forum: Charts and Graphs
use formula field. Write your condition in that formula field and in select the display string option of the column in the report.Make the display string output as the output of formula field.for eg. @formula -
Formula Field if e>800 then conditionelse condition; Number -
column in field. Display string option (at the bottom of the field format object --general tab) map the output of the formula field -
Conditional Formating of rows and columns in template(cross tab)
Hi,
I am developing a cross tab report in which I have row header as the year like 2008,2007,2006....column header as months jan,feb,mar...and the data area contains the respective data...I need to format the background color of the rows and columns which are below the date of the report(report is ran for a particular month like mar-08)..I was able to format the background color of all the rows that fall below(ex:08) the year of the report(using <?if@row:row_name<'$first'?> <xsl::attribute name="background-color" xdofo:ctx="incontext">#C0D27F</xsl::attribute><?end if?>)..
and I need to format the 3(till march) columns in the yr 2008
Thanks...Hello..
Thanks for the reply...
I have report date as mm|yyyy...below is a sample data of the cross tab..
<Q1>
<REPORT_DATE>04|2005</REPORT_DATE>
</Q1>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>JAN</MONTH_BEGIN_DATE>
<BEGIN_DATE>2004</BEGIN_DATE>
<NET_ROR>1.32</NET_ROR>
<ACTUAL_DATE>01/01/2004</ACTUAL_DATE>
<FUND_FACT_YTD>7.942192987387475647074276803933198866</FUND_FACT_YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>JAN</MONTH_BEGIN_DATE>
<BEGIN_DATE>2005</BEGIN_DATE>
<NET_ROR>-.21</NET_ROR>
<ACTUAL_DATE>01/01/2005</ACTUAL_DATE>
<FUND_FACT_YTD>5.739540457478967975310388578877768035</FUND_FACT_YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>FEB</MONTH_BEGIN_DATE>
<BEGIN_DATE>2004</BEGIN_DATE>
<NET_ROR>.59</NET_ROR>
<ACTUAL_DATE>02/01/2004</ACTUAL_DATE>
<YTD>7.942192987387475647074276803933198866</YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>FEB</MONTH_BEGIN_DATE>
<BEGIN_DATE>2005</BEGIN_DATE>
<NET_ROR>1</NET_ROR>
<ACTUAL_DATE>02/01/2005</ACTUAL_DATE>
<YTD>5.739540457478967975310388578877768035</YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>MAR</MONTH_BEGIN_DATE>
<BEGIN_DATE>2004</BEGIN_DATE>
<NET_ROR>0</NET_ROR>
<ACTUAL_DATE>03/01/2004</ACTUAL_DATE>
<YTD>7.942192987387475647074276803933198866</YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>MAR</MONTH_BEGIN_DATE>
<BEGIN_DATE>2005</BEGIN_DATE>
<NET_ROR>-.2</NET_ROR>
<ACTUAL_DATE>03/01/2005</ACTUAL_DATE>
<YTD>5.739540457478967975310388578877768035</YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>APR</MONTH_BEGIN_DATE>
<BEGIN_DATE>2004</BEGIN_DATE>
<NET_ROR>-.07</NET_ROR>
<ACTUAL_DATE>04/01/2004</ACTUAL_DATE>
<FUND_FACT_YTD>7.942192987387475647074276803933198866</FUND_FACT_YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>APR</MONTH_BEGIN_DATE>
<BEGIN_DATE>2005</BEGIN_DATE>
<NET_ROR>-.87</NET_ROR>
<ACTUAL_DATE>04/01/2005</ACTUAL_DATE>
<YTD>5.739540457478967975310388578877768035</YTD>
</Q4>
MONTH_BEGIN_DATE goes as the column header, BEGIN_DATE goes as the row header and NET_ROR is the data area..I need to get the background color of each cell of NET_ROR below the report date as one color...
Thanks .. -
Format Fields in Cross Tab and Calculated Members
Hello:
I have a cross Tab with a calculated member, I need to display one decimal or no decimal in some of the columns so I created a formula in the Display String option like this:
if GridRowColumnValue ("@TestID_desc")= "ALK mg/L
then
Cstr(CurrentFieldValue, "0")
else
Cstr(CurrentFieldValue, "0.0")
But, after I saved the formula the value in the calculated member colums disappears. Any ideas? Thank You in advance!right click on calculated field and go to format field and in number tab select customize button and write the condition for decimals.
regards,
Raghavendra -
Help with formatting for Cross Tab Report Crystal 2008
This is probably a simple question. I have a cross tab report that displays sales by month for a period of 6 months. These sales columns are formatted to be numbers with no decimals. In addition to these columns, I have inserted columns that display the percentage up/down in sales over the previous month. If I try to format the percentage columns, it changes every column to then display "##,##.##%" when I need to keep the sales columns at "##,###" with no decimal or percentage sign.
1. Is there a way to change the formatting of some of the columns but not all in a cross tab report?
2. If not, can I add a function that would change these in the calculation formula of the calculated member?
I tried to add "%" but it wants it to return a number.
Here is the current code:
//The calculation formula is used in place of the summaries in Calculated Members.
// This calculation formula must return a/an Number value.
If GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex) = 0 then 0 else
((GridValueAt (CurrentRowIndex,CurrentColumnIndex-1,CurrentSummaryIndex) -
GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex)) /
GridValueAt (CurrentRowIndex,CurrentColumnIndex-3,CurrentSummaryIndex)) * 100
Any help is appreciated.
Thank you,
TobiCarl,
Thank you for your help. I did try your method but still couldn't get it to ignore the fact that it wanted a number. I changed my approach a litte and managed to solve the problem. Here is the method that I chose which managed to solve the problem. If this is a poor way to solve it, please let me know as I am always open for new ways.
Format Field > Number Tab > Customize > Currency Symbol Tab
Checked Enable Currency Symbol Fixed, changed currency symbol to %. This is the same thing that I did before which changes it for all columns.
Beside Enable Currency checkbox, I added this formula:
// This conditional formatting formula must return one of the following Currency Symbol Constants:
// crNoCurrencySymbol
// crFixedCurrencySymbol
// crFloatingCurrencySymbol
If GridRowColumnValue("InvoiceLine.TxnDate") = Date(0,0,0) then
crFixedCurrencySymbol
else
crNoCurrencySymbol
My added columns have a null date field so they take the currency format. My other columns do not so they do not take the formatting.
Thanks again for the help.
Tobi
Edited by: Tobi@TABeverage on Dec 2, 2009 3:58 PM -
Can you conditionally format a cell in a cross-tab based on the value in other cells? Thanks in advance.
Hi,
You can use similar condition.
IF GETCOLUMNGROUPINDEXOF(CURRENTCOLUMNINDEX)= 1 AND GRIDROWCOLUMNVALUE(u201CMONTHu201D)=u201DJANu201D AND GRIDVALUEAT(CURRENTROWINDEX, GETCOLUMNPATHINDEXOF(u201CJANu201D), CURRENTSUMMARYINDEX) > 5000 THEN
CRRED
ELSE
CRBLACK
This example will highlight amount in red color under January month column where the amount is greater than 5000.
Hope this helps.
Maybe you are looking for
-
ITunes library on one computer accessed by several
Hi can a iTunes library be kept on one mac, be accessed by three other macs and respond immediately? The systems would be hardwired. The various macs would be using only iTunes and Traktor only. The router would be a Netgear 4 port +wireless with a s
-
How to configure Oracle Linux 6.5 to request ip address from dhcp server
I have installed Oracle Linux 6.5 (minimal installation) on a virtual machine created on VMware vSphere 5.5. I have tried to configure dhcp during the installation by editing IPv4 Settings of System eth0 to use Automatic (DHCP) but somehow it does
-
Tables in memory (Nested tables ?)
For performance reasons, I would like to insert, update, etc... a table in memory. Can I use a nested table as if it was a normal table ? Can I do updates on nested tables with values from normal database tables ?? Statement like : Update <nested-tab
-
Very annoying music problem with slideshow
I have been trying the whole afternoon to solve a perplexing problem when trying to set up a slideshow: Initial problem: When selecting one or more songs, using various methods such as directly selecting the song, using a playlist from iTunes or a "c
-
I didn't enable icloud when I first set up my iPad. Now I have an iPhone using icloud and I want to use it on my iPad as well. Problem is, in my settings menu on the iPad icloud can no longer be found. How can I enable it if it isn't there anymore