Analyser: Presenting negative key figures in red font

I need to show negative key figures with a red font within Analyser. I have got as far as creating a template workbook and in there changing the SAPBExStdData style to include number formatting that has red negatives. When I create a workbook based on this template and check the style of one of the negative values, then it is picking up my modified style. However, the style is not actually being applied unless I select each cell, open the style dialog and click OK! Even if I do this the colour reverts back to black at the first refresh. Any ideas?

I solved the requirement with the following code, this retains the formatting (currency etc) applied by BEx and also checks to see that the cell background is not set to red (for example by an exception).
Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
    Dim negColour As String
    ' loop through all cells in the results area
    For Each c In resultArea.Cells
        ' ignore cells with no number formatting at all
        If c.NumberFormat > "" Then
            ' make sure that the number formatting includes actual numbers
            If InStr(c.NumberFormat, "0") > 1 Then
                ' if the background is red then use white to colour negative values
                If c.Interior.ColorIndex = 3 Then
                    negColour = "[White]"
                ' otherwise use red text for negatives
                Else
                    negColour = "[Red]"
                End If
                ' if the number format is already split for negative values
                If InStr(c.NumberFormat, ";") > 1 Then
                    ' insert just the negative colour formatting
                    c.NumberFormat = Replace(c.NumberFormat, ";", ";" & negColour)
                ' otherwise the split and formatting need to be added
                Else
                    c.NumberFormat = c.NumberFormat & ";" & negColour & "-" & c.NumberFormat
                End If
            End If
        End If
    Next
End Sub

Similar Messages

  • Negative Values  - in Red Font

    Hi SDNers,
    We are on BI 7.0 SP 16.
    We have created custom Web Templates for our customer and are using Portal Themes to control the "look & feel" of the Web Reports, which are presented via the Consumer portal (not BI Portal but EP Portal).
    My Question is : Is there a way to show negative values in Red Font color (we are not talking about background cell colour for negative values as RED which can be acheived by exception reporting).
    The Reports are presented on WEB via EP Portal ,so no excel here...
    Any suggestions will be appreciated.
    Thanks
    TC

    Hi Tony,
    Suggestion of code in method DATA_CELL will be below:.  The only thing is that below code is doing a left justification instead of displaying in red. You will need to find out how to display in red in HTML and replace it in the codes.  Hope it help.
            l_value type i,
            l_replace type string,
            l_new  type string,
            l_txt(20),
            l_valn(20).
      move i_value to l_value.
      if  l_value lt 0.
        write l_value to l_valn left-justified.
        concatenate '>' l_valn '<' into l_replace.
        condense l_replace no-gaps.
        concatenate 'style="float:left;" ' '>' l_txt '<' into l_new.     " replace value and left justify text
        condense l_new no-gaps.
        replace l_replace in c_cell_content with l_new.
      endif.
    Regards
    Kate

  • Key figure present in Infocube but not in Transformation

    Hi All,
    I have added two new quantity key figures in my cube but I am not able to find them in Trnasformation from undelying DSO to the said CUbe.
    ALtough if i search for the Key figures in the cube i am able to see them but they are not present in the trnasformation.
    NOTE: i have 252 char and key figures in my cube at present ( this number i got from the sl no field in transformation

    Hi,
    Check for the consistency of the cube and Activate again, the related transformations should go for inactive,
    Add the same 2 KFs in the underlying DSO as well, activate
    then check the 2 KFs should be in the Transformations, mapp it and acticvate.
    Regards
    ReddY A

  • How to populate values in DP key figure which is not present in Info Cube

    Hi
    We have a special Key figure in Demand Planning created for uplaoding Forecasts coming directly from customer,
    This key figure is not present in Info Cube and data doesnot pupulate in this key figure through Info cube build,
    Hence data in this key figure is to be loaded externally , Customer sends his forecasts through EDI messages, Now we want to update forecast from external customer in to this  special key figure,
    Please suggest some ways
    Thanks and regards,
    Nitin Lavhe

    Hi
    I think you can get loaded this information in the cube in any other key figure which is available in the info cube. Then while loading the data into planning area using TSCUBE, you can define the key figure assignment.
    In which you define data from which key figure of infocube has to be get loaded into which key figure of planning area. Here you can define the respective key figures.
    Please let us know if it helps you. Please let us know if you require any more information from our side.
    Thanks
    Amol

  • Customer-Specific Key Figure and MCI3 analysis report

    Hi,
    We have created a "Customer-Specific Key Figures" in customizing and mapped the key with value category. But this new defined key figure is not available in the report MCI3.
    How to get this figure in the analysis report MCI3 etc , i.e. how to update the information structure S115.
    Regards

    Hello,
    You have to develope the new programme using that info structure and update that new value field in your customising logic programe .
    Regards,
    Rakesh

  • How to avoid negative values of key figure

    Dear all,
    I have to create one query based on ODS, in which i will use one key figure, which has negative as well as positive values. In report, i want to avoid all negative values or make them zero. Is it possible?  Please guide me for the same.
    I cann't make any modification to the ODS.
    Regards,
    Pravin.

    Hi,
    To make negative values as possitive you can use the formula abs().
    ie:  abs(key figure)
    You can also create a condition in the query to show only values greater than or euqal to 0. Make it active, then you will get all values greater than or equal to 0.
    Now if your intention is to show the negative values as 0 then use the formula as stated above.
    Regards
    Govind.

  • Select the Key Figures to be presented in a query before execute the it

    Hi,
    I want to select(through checkbox) the Key Figures to be presented in a query before executing the query. I'm creating BEX queries and web templates (I'm working on BEX 7.0).
    I haven't found clear post about this so if you have implemented something like this please help me and share your solution.
    Kind regards,
    Ana

    Hi,
    If you set a property of your KF as "Hide and can be shown", you will get a filter option for these KFs after executing the report in the navigational block of web report.
    When you click on that filter, you will get the list of KFs, then you can select the desired KFs using check box.
    Regards,
    Yogesh.

  • Average in Results row in calculation properties for Bex Key figure does not work in Analysis for Office 1.4.7

    We are moving from Bex 3.5 to Bex 7.0 and using Analysis for Office 1.4.7
    We have queries that do an average for the results rows of dynamic calculations and the queries will not open in Analysis for Office 1.4.7 (example is below)
    We get an error message that can be found below
    We were able to open the queries in Analysis 1.4.5 with the correct results.
    We do not understand why it worked in an older version and not the new one.
    Is there something missing in the version 1.4.7 of Analysis for Office that is preventing our queries from running?
    We do not want to move back to 1.4.5 because the performance is better in 1.4.7.
    Help.....

    Hi Patty,
    I just checked 1.4.7 by making "Calculate Results As.." for Key figure and formula to Average(and also tried others as well). No error is coming in Analysis Office. reason might be because of other reason
    Any way, As Tammy Powlas suggested can you check with SP8

  • Negative values of key figures to be displayed seperately

    Hi,
    I have a requirement where , the postive sales figures are to be displayed in one column and Negative sales figures are to be displayed in another column ina BEX report.... There is only one key figure ( sales )
    how to get this please ?
    PVC

    Hi Pravendar ,
    Thanks for your reply..
    The key figure infoobject is only one called Sales..
    If the value is negative , then it should display in seperate column in teh report..
    I could not understand        (KF < 0) * KF  -
    If the slaes figure is -1233   does this mean i should created a CalKeyfig
    with (Sales < 0) * Sales  ??
    Can you please elaborate ?
    PVC

  • Key Figure Sorting in Workbook

    Hi Experts,
    I am creating a workbook where the key figures are supposed to be sorted in descending order. I tried using a Condition the displays the Top 100% of the results (because I want to display all, I just want to sort). The condition is working fine during the first run. However, when I save the workbook and re-open it again, the sort does not work anymore. Please advise. Any help is greatly appreciated.
    Thanks,
    Juice

    Hi Juice,
    Why dont you use the key figure sorting property present in the the Bex Analyzer.?
    Steps:
    1.  In analysis mode, select a key figure cell in the analysis grid and access the context menu. This can be done in 2 ways..
    ○       Choose the cell with your right mouse button (secondary mouse button).
    ○       From the menu, choose BEx Analyzer --> Context Menu for Selected Cell
    2. Choose Properties.
    The properties dialog box for the selected key figure appears.
    On the Sorting tab, you can configure the different sort options for the selected key figure.
    Hope this helps you!
    -Pradnya
    Edited by: Pradnya Rane on Mar 24, 2009 5:20 AM

  • Non-cumulative key figure in Real Estate implementation

    Hi all,
        I am implementing Real Estate Module in BW.  We are doing analysis on Condition amount ( BKOND).
        The mapped Info Object on BW side is 0COND_AMT, according to standara info sources given by sap ( for e.g in  0RE_3)  and it is defined as a Non-cumulative KF with Non cumulkative Change  0COND_CHG.
      Can anybody plese explain me the logic behind this. and also source field and table for this 0COND_CHG in R/3 side.

    Hi Ravi,
          Please make sure that when you use a non cumulative key figure iun your real time info cube, then choose a time reference characteristic for that key figure.
    Then, this time reference characteristic applies for all the non-cumulative values of the InfoCube and must be the u201Csmallestu201D of the time characteristics present in the InfoCube.
    For more detaisl, refer to the [http://help.sap.com/saphelp_nw70/helpdata/en/39/100c38e15711d4b2d90050da4c74dc/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/39/100c38e15711d4b2d90050da4c74dc/frameset.htm]
    Thanks & Regards,
    Balajee.

  • Is it possible to display a Bottom 10 on a key figure on values 0 only?

    Hi
    Is it possible using BEx Query Analyser to display a bottom 10 based on key figure values greater than 0?
    I can create a condition which has the Bottom 10 on a Sales Qty key figure, but my problem is that this key figures includes some values of zero and negative values, I want to ignore these.
    I have tried creating another condition, values > 0.  This works on it's own but not with the Bottom 10. 
    I appreciate a possible solution would be to do this in data provider but we do not have access to this in our new environment.
    Any responses appreciated, thanks in advance
            Lloyd  Bower

    Arun,
    Thanks for the reply, unfortunately your suggestion produces the same effect as one of my original ideas (two seperate conditions on same key figure).  i.e. it only reports those in the original bottom 10 with have a Key figure qty of >0,
    e.g. 3 records, as the other of the original bottom 10 have a key figure qty of 0 or a minus figure.
    I'm wanting to achieve a bottom 10 of those records with a key figure above zero.
    There are sufficient records in my data with a key figure above 0, for a bottom 10 to be reported.

  • Change order of key figure is not working in Web report output (using WAD)

    Hi,
    We are using BI 7.0, release 701 and level 008. We are facing problem in WAD (web report output). When ever we do 'Select filter' for key figures and 'change the order' of key figures, it does not get reflected in new order. Though drag and drop of key figures is working.
    Though same change order is working fine in Bex Analyser.
    Kindly suggest some inputs.
    Thanks.

    Hi,
    On Which Service Pack are you on?WAD has this feature of re arranging the keyfigures in BI 7.0 for SPS 14...
    Regards,
    Bhagyarekha.

  • How can i display all the Coloumns (Key Figures) in the Report's same page

    Hi All,
    I am currently working on the BI 7.0 reporting. In the BEx Query Designer report, I am having 13 coloumns (7 Key figures and 6 Formulas) in the report. It is now displaying 10 coloumns in the First page of report. The other 3 coloumns can be seen by clicking on the next page. But the requirement is to see coloumns in the SAME PAGE.
    Are there any settings OR any other thing in the Query Designer, which can enable me to see all the coloumns on SAME page. The users are not interested in scrolling next page for 3 coloumns.
    Appreciates the Quick help/Response, please.
    Regards
    Ramana

    In Web Application Designer, for the properties of your analysis webitem under the Paging category, change parameter 'Number of Data Columns Displayed at Once' (BLOCK_COLUMNS_SIZE) to 0.  This will make all columns show instead of paginating as it is doing now.

  • Key Figure Display in Interactive Planning

    Hello,
    I am unable to display some of the key figures in  SNP Interactive Planning. All these Key Figures are present in Planning book and are also included in the data view.
    Is there any setting wherein I can control the display of Key figure although that key figure is present in Planning book and data view. For Example I have my "safety stock" key figure in my planning book and data view, but I am unable to see the "safety stock" key figure in SNP interactive planning.
    Would really appreciate your help.
    Thanks,
    Sarath.

    Hi Visu,
    Your answer is really helpful, thanks for that. But while I am trying to hide some key figures it is not allowing me to do so. It is either hiding all the key figures or unhiding all. Please let me know if why the system is behaving like this.
    Thanks

Maybe you are looking for