Showing contents of a column based on a condition for another column.

Hello,
I am trying to create a report that lists all of the Opportunities within our database. I need a few details about this opportunity to appear. I need the account name that this opportunity belongs to, amongst other things- which I can do, however I also need to show the number of UNITS for this opportunity BUT I have a condition that needs to be met before I show the number of units.
I only want to show the UNITS IF the PRODUCTTYPE that this opportunity belongs to is "GA". Then I also need another column with UNITS in it, but again I only want the UNITS to appear if the PRODUCTTYPE IS DA.
Essentially I am trying to find out the number of units per product type and I need these to appear in separate columns. If the PRODUCTTYPE doesn't meet the condition, i.e. the PRODUCTTYPE is not GA then I would like the field to be blank.
I know that I should write this formula in the "Edit Formula" of the UNITS field, but I do not know how to write this condition.
I would very much appreciate some help as soon as possible.
Kind Regards,

Hi,
You need to use a case statement, it looks like this:
CASE
WHEN opportunity.producttype = 'GA'
THEN opportunity.units
ELSE NULL
END
Ofcourse you need to use the correct column names.
Regards, Tim

Similar Messages

  • Show or Hide empty table based on If condition

    I want to show or hide empty table based on condition. The table will be empty with 5 rows,2 cols and should display if <?Rout_Information1_id1?> is blank or null or when XML field is not present. Actually the JDEdwards report will generate XML file. In the XML file if <?Rout_Information1_id1?> is present it will have definitely value like 'PULL' or 'Cut' otherwise sometimes XML field itself will not be present. Need to display the empty table when the <?Rout_Information1_id1?> is not present. I am trying to do as below but the table is not displayed. Can someone tell me how to resolve this.
    <?if:Rout_Information1_id1=' '?>
    5 rows,2 cols table
    <?end if?>
    Thanks,
    Vijay Vattiprolu

    Ok. I used the below syntax from other post and it resolved displaying empty table issue.
    <?if:not(XML_TAG_NAME)?>
    <?end if?>
    Thanks,
    Vijay

  • Show content in a list based on previligies???????

    Here is my scenario. I have a page that a Super User uses to add content of item type and set the access previligies for users who will ba able to see this. I am developing a Java Portlet that will have a drop down list populated with the links to above added content. The list populates based on the user previligies and only shows items that a user has access. Selecting any item from the list will display the content in a new window. Can someone guide me how can I achieve this, tables to look etc. Any help is appreciated.
    Thanks

    You can modify the properties of your System Name lookup column so that the System Manager and System DVP columns are automatically pulled in.  They can then be displayed in views of the Bug list as if they were columns on the Bug list.  To do
    this, go to List Settings, then click the name of your lookup column; in the Additional Column Settings area it will say "Add a column to show each of these additional fields" followed by a series of checkboxes for different columns you can choose to duplicate.
    I don't believe that you can show people-picker columns from a lookup connection, but you can get around this by adding simple single line of text field to the System list, then creating a SharePoint Designer workflow on your System list that copies the
    System Manager name to the new field whenever an item is added or updated.  The new field can be brought in through the lookup column without any problems.
    To update the Assigned Date, Rejected On, and Rejected By fields, the simplest option would be a SharePoint Designer workflow that triggers when an item is added or updated on the bug list.  You'll want to create a couple columns to keep track of what
    the Status and Assigned To fields were set to (you could call them PreviousStatus and PreviousAssignedTo).  Then in the workflow you'll be able to compare the current value to the previous value and execute whatever logic you want.
    Since you don't want users updating these new columns you'll be creating, you can hide them from the list forms.  To do this, first enable content types on the list (List Settings -> Advanced Settings -> Allow management of content types). Then
    from the list settings page, select your content type (Item), then click the name of the column you want to hide, then choose "Hidden" in the Column Settings section.
    Hope that helps point you in the right direction!

  • How to calc sum of one column, based on the condition of another column?

    I would like to create a formula that adds up the total cost from column F for each specified service in column D. For example, the result for PM (project management) would be $495. Any ideas?

    I think you could use this formula, using your cell references:
    =SUMIF(D4:D21,"=CM",F4:F21)
    Then, change the "=CM' to "=PM", etc. for each service.
    Like JaxJason, I can't test this in Numbers right now, but it works in Excel, and the functions are identical.
    SUMIF(test-range, "condition", [sum-range]):
    * test-range: A reference to the range of cells containing values to test. Must be the same dimensions as sum-range.
    * "condition": Any comparison statement that results in a logical TRUE or FALSE value.
    * sum-range: Optional; a reference to the range of cells containing the numbers to be added. Must have the same dimensions as test-range. If omitted, test-range is used.
    I hope this helps.
    - Michael
    Message was edited by: Apple fan Michael

  • How do i export the table data based on some condition for backup

    Is is syntax correct
    exp scott@orcl92 file=emp_29aug.dmp tables=emp
    query=\"where emp_no in (1,2,3,4) \".
    How do i take the backup of more than one table?
    what is the syntax for that
    Thans

    Thanks for your response
    If i want to add more than one condition in the query, then how do i do that
    exp scott/tiger@orcl file=scott.dmp tables=(emp, dept) query=\"where deptno = 30\" and emp_no in (1,2,3,4);
    how do i do that

  • Display Image(which set as behind text)   based on some condition.

    hi all
    I have developed a xml report and in that rtf am displaying a static image (which is set as behin text).
    But i need to display the image based on some condition
    for example i have a field as ORG_ID
    if org_id=87 then image should display for that purpose am planning to use <?if:ORG_ID=87?> condition but where to place this condition for the image.
    kindly help me
    thanks for all in advance.

    that too not working because
    on image am displaying some other fields.
    see i think you didn't get my point.
    in my out put page am displaying item details ,quantity,and cost and customer details just like invoice copy .
    behind this data am displaying my company logo which will capture whole page size..
    if i place the image in table then fields will be automatically in table so i cant restrict image in this way.
    Kindly suggest any other way that works only for image which is behind text. i mean condition should be applicable only for image and leaving all other fileds in rtf.
    or
    help on this how to set a dynamic image as behind the text.
    Edited by: maddy on Nov 28, 2012 7:32 AM
    Edited by: maddy on Nov 28, 2012 7:35 AM

  • Need to show the images in calculated column based on the condition in sharepoint 2013.

    Hi ,
    I'm working in sharepoint 2013, In this i want to show an image in calculated column based on the condition, but image is not showing .
    In sharepoint 2010 its working with help of javascript in content editor on the same page. Same thing i tried in SP 2013. but doesn't work.
    Could any one please give proper solution for this?
    Thanks in advance.
    by,
    Siva.

    Hi please provide the JS you have used in the content editor as well as the calculation for the column so we can better understand what's maybe differs?
    Blog: chrisstahl.wordpress.com Twitter:
    @Cstahl

  • SSRS show trend chart over column chart per series groups

    Need help in designing following report in SSRS, where I have a chart report with 2 category grouping fields and 1 series group field (as with category grouping, the reason being, i need to show columns in group of 4 joined together based on their grouping
    on top) .
    Below are my queries
    1. how to show my category grouping values on top of chart (showing group in different color) and series grouping values on bottom of chart (under each bar)
    2. I need to show trend line over each series group data.
    For example, First category group is over hotel name, second category group is over room type (deluxe, executive & suite) and one Series group over week number (for a month report), and the chart value is total occupancy (per hotel per room type per week
    number). Now for point 1, Hotel name and room type needs to be on top of the column (total occupancy) chart, where a week iteration number (1,2,3,4 for a month) at the bottom of the chart under every column.
    And for point 2, I need to show trend line per room per week occupancy was improved or not.
    Regards, Sujay

    Hi Sujay,
    According to your description, you want to display the two category group values at the top of the total occupancy value. Also you want to create a trend line over series values.
    For your first requirement, you can specify the Label data as a combination of two category group values and total occupancy values. Then change the location of series group value legend. Please refer to below screenshot.
    For your second requirement, you can add additional total occupancy values to the Chart Data panel, then change the chart type as Smooth Line.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • How to show or Hide Generic Column in a regular report

    Hi All,
    I have created report based on "SQL query (pl/sql function body returning sql query). It returns columns based on some conditions. I have total 60 generic columns like (COL1,COL2....COL60) but it returns 18 or 20 columns based on my conditions, how can I hide the columns that I don't needed. My column heading is based on function return by ':' separated. My function returns number of columns also. Is there any we I can show only those columns which contains data. My report is exactly similar to the default "SQL query (pl/sql function body returning sql query). I didn't find any logic how they are doing this show and hide. I appreciate any ones help.
    Thanks,

    Hi there,
    Somehow you need to find out how many columns your dynamic select will return (by what you said it seems that your procedure returns this information). Then store that number in a hidden page item, say Pnn_COUNT.
    Then, for the 19th and 20th columns in the report add these conditions:
    Column 19: :Pnn_COUNT >= 19
    Column 20: :Pnn_COUNT >= 20
    I hope this helps.
    Luis

  • How to format paragraph string to show content left, Right or middle of pdf document using iTextsharp ' vb

    Dear All
    how to format paragraph string to show content left, Right or middle of pdf document using iTextsharp in visual basic and absolute position on the document.
    Thanks

     Here is one more example that i have modified the GetCell function so that you can use it for adding all the cells to the document.  It takes several arguments to specify everything you need to create each cell.  It now lets
    you specify the Text, the Text Alignment, the Text Font and color, weather the cell shows the Border, the BackColor of the cell, and the Padding values for the Left, Right, Top, and Bottom.
     If you study the code you should be able to figure out how it works.  From here you can figure out the rest of what you need to do and how to use the
    GetCell function.
     With one quick google search for "iTextSharp Documentation" the first link to pop up was this link.
    iTextSharp Documentation
    Imports System.IO
    Imports Its = iTextSharp.text
    Public Class Form1
    Private dt As New DataTable
    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
    dt.Dispose()
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    dt.Columns.Add("Name")
    dt.Columns.Add("Age")
    dt.Columns.Add("Birth Date")
    dt.Rows.Add(New Object() {"Johnny", "23", Now.AddYears(-23).ToString})
    dt.Rows.Add(New Object() {"Frank", "41", Now.AddYears(-41).ToString})
    dt.Rows.Add(New Object() {"Rex", "33", Now.AddYears(-33).ToString})
    dt.Rows.Add(New Object() {"Kim", "26", Now.AddYears(-26).ToString})
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim MyPdfFilePath As String = "C:\TestFolder\MyPdf.pdf"
    Dim pSize As New Its.Rectangle(Its.PageSize.A4)
    Dim PdfDoc As Its.Document = New Its.Document(pSize, 10, 10, 10, 10)
    Dim PdfImage As New Its.Jpeg(New Uri("C:\TestFolder\MyLogo.jpg"))
    PdfImage.Alignment = Its.Jpeg.ALIGN_CENTER
    Dim pTable As New Its.pdf.PdfPTable(1)
    pTable.AddCell(getCell("Name : " & TextBox1.Text, Its.pdf.PdfPCell.ALIGN_CENTER, Its.FontFactory.GetFont("Arial", 15, Its.BaseColor.BLACK), False, Its.BaseColor.WHITE, 10, 0, 0, 0))
    pTable.AddCell(getCell("Policy : " & TextBox2.Text, Its.pdf.PdfPCell.ALIGN_CENTER, Its.FontFactory.GetFont("Arial", 20, Its.BaseColor.RED), False, Its.BaseColor.WHITE, 10, 20, 0, 0))
    Dim cTable As New Its.pdf.PdfPTable(dt.Columns.Count)
    For Each col As DataColumn In dt.Columns
    cTable.AddCell(getCell(col.ColumnName, Its.pdf.PdfPCell.ALIGN_CENTER, Its.FontFactory.GetFont("Arial", 12, Its.BaseColor.WHITE), True, Its.BaseColor.BLUE, 3, 5, 0, 0))
    Next
    Dim tblfont As Its.Font = Its.FontFactory.GetFont("Arial", 10, Its.BaseColor.BLACK)
    For Each row As DataRow In dt.Rows
    cTable.AddCell(getCell(row.Field(Of String)("Name"), Its.pdf.PdfPCell.ALIGN_LEFT, tblfont, True, Its.BaseColor.WHITE, 3, 4, 3, 0))
    cTable.AddCell(getCell(row.Field(Of String)("Age"), Its.pdf.PdfPCell.ALIGN_CENTER, tblfont, True, Its.BaseColor.WHITE, 3, 4, 0, 0))
    cTable.AddCell(getCell(row.Field(Of String)("Birth Date"), Its.pdf.PdfPCell.ALIGN_RIGHT, tblfont, True, Its.BaseColor.WHITE, 3, 4, 0, 3))
    Next
    Using fs As New FileStream(MyPdfFilePath, FileMode.Create, FileAccess.Write, FileShare.None)
    Using pdfWrite As Its.pdf.PdfWriter = Its.pdf.PdfWriter.GetInstance(PdfDoc, fs)
    PdfDoc.Open()
    PdfDoc.Add(PdfImage)
    PdfDoc.Add(pTable)
    PdfDoc.Add(cTable)
    PdfDoc.Close()
    End Using
    End Using
    PdfDoc.Dispose()
    End Sub
    ''' <summary>Creates a new cell for the table.</summary>
    ''' <param name="text">The text string for the cell.</param>
    ''' <param name="alignment">Alighnment for the text string.</param>
    ''' <param name="textfont">The font used for the text string.</param>
    ''' <param name="border">True to show the cell border. False to hide the cell border.</param>
    ''' <param name="backcolor">The background color of the cell.</param>
    ''' <param name="padtop">The amount of padding on the top of the text string.</param>
    ''' <param name="padbottom">The amount of padding on the bottom of the text string.</param>
    ''' <param name="padleft">The amount of padding on the left of the text string.</param>
    ''' <param name="padright">The amount of padding on the right of the text string.</param>
    Public Function getCell(ByVal text As String, ByVal alignment As Integer, ByVal textfont As Its.Font, ByVal border As Boolean, ByVal backcolor As Its.BaseColor, ByVal padtop As Single, ByVal padbottom As Single, ByVal padleft As Single, ByVal padright As Single) As Its.pdf.PdfPCell
    Dim cell As New Its.pdf.PdfPCell(New Its.Phrase(text, textfont))
    cell.BackgroundColor = backcolor
    cell.PaddingLeft = padleft
    cell.PaddingRight = padright
    cell.PaddingTop = padtop
    cell.PaddingBottom = padbottom
    cell.HorizontalAlignment = alignment
    If Not border Then cell.Border = Its.pdf.PdfPCell.NO_BORDER
    Return cell
    End Function
    End Class
    If you say it can`t be done then i`ll try it

  • Show more than 5 column in web analyzer

    dear all,
    how can i set web analyzer to show more than 5 column , for examples all kfigures in one page?
    thanks

    Hi John,
    Open the Web Application Designer.
    Open the 0Analysis_Pattern file. (This is the default template for Web Analyzer)
    On Properties panel select Analysis(Grid)
    Select Web Item Parameters Tab
    Look for Paging section.
    On Number of Data Columns displayed at once change from 4 to 16
    On Number of Data Rows displayed at once change from 10 to 100
    Finally Save the 0Analysis_Pattern file.
    The 0Analysis_Pattern is included in the Business Content. So, if necesary you can recover the original version.
    Hope it helps.

  • Show content ratings in library

    There's a check box in the general tab of the iTunes preferences that says "Show content ratings in library". What does it do really? I uncheck it and nothing happens, I recheck it and again no difference in the way I view my library. By the way, I do have the rating column visible in my views and most of my content is rated.
    Thanks in advance. Constantine

    Constantine,
    It is not the same thing.
    The "My Rating" column is either blank, or 1 to 5 stars, as set for each track by your own user input.
    The "content rating" can have values blank, "Explicit," or "Clean." If you have checked the option that you noted on the General tab, one of those 3 values will appear next to the name field for each track. Those rating are assigned in the Store, and unless you have wild and crazy tastes, most of them are probably blank. That is why you noticed "no difference in the way I view my library."
    Ed

  • Column hiding /unhiding based on a condition

    I have a report in which I want to add "State" Column. But it show up only when "Region" = 'Northeast'. And do not show State for other "Region"
    So basically, I want to hide "State" column dynamically based on condition where "Region"='Northeast'.
    Would Siebel On Demand let us do Column hiding /unhiding based on a data condition?
    Please let me know if this is possible.
    Thanks
    Rakesh

    I don't think SOD lets hide/unhide a column based on a condition. All you can do is restrict the number of rows using a filter.

  • Top x for "show data as % of column"

    I have the below requirement: (obiee 11g)
    Attribute - Value - % of total value
    I am calculating "% of total value" by creating duplicate column and selecting "show data as % of column". This is working fine.
    Now there is an additional requirement to display "top x" values based on "value" column or "% of total value" column.
    If I add filter "top 10" on "value" - % of total value is getting calculated only based on those 10 values but not all values.
    How I can display consistent "% of total value" based on sum of total "value" but not just top x with the ability to show top 5, or top 10 etc.
    Your responses are highly appreciated.
    thanks.
    Edited by: 917421 on May 15, 2012 10:12 AM

    HI,
    Please refer the link.
    http://myobieeworld.blogspot.in/2009/02/dissecting-paint-repository.html
    Hope it help's
    Thanks,
    Satya

  • Content Targeting in Engage based on Clickstream or navigation pattern

    Hi Experts,
    I have implemented content targeting using Engage based on the visitor's profile (collected via registration/login page).
    What I want to know is, is it possible to target content based on the click stream or navigation pattern/behavior of the visitor?
    Please let me know where I can find pointers/documentation related to this kind of implementation.
    Thanks!
    DFy

    I finally managed to complete this (been juggling it with three other tasks!).
    What I did:
    I created History Definition and History Attributes.
    Coded the templates (with vdm:recordhistory tags) so that clicking a link fetches values from content attribute and store as history attribute values.
    Created segments like SportsFan, MarvelFan, etc. with segment criteria on values of the history attributes.
    Created the recommendations.
    The result: When site visitors click on links or browse the site, they get classified into segments (based on the content clicked of course!) and the home page calculates the segment and shows the recommendations. Also, since the classification into segments is stored in the database (using history attributes), a visitor gets to see recommendation based on his earlier visits.
    Let me know if this helps anyone.
    Cheers!
    -DFy

Maybe you are looking for

  • Date object doesn't work in query filters

    I'm trying to create a universe object called Next Biweekly Pay End Date.  Some background: there is an end date for our biweekly payrolls every 14 days, and the logic behind the object is basically that if there was a biweekly pay end date 7 days ag

  • Html form - java applet

    Hi friends I have an html form with an editable textfield on it. Next to it is an Java Applet with an Button on it. If you klick the button, a Popup aperars where the textfield can be modified. There is also an OK Button on this Popup. If you klick t

  • Cannot get PAGES to open

    Cannot get PAGES to open

  • FM FOR org structure traversal

    I NEED FM TO TRAVERSE ORG STRUCTURE.............................

  • Parental control account hangs on login after idle

    I've got two parental controlled acounts set up on my kids computer which is running 10.8.3. If they don't log out and the system locks from inactivity, when they go to log in it hangs. I havent' been able to confirm, but it might only occurr when th