Column data proportion after horizontal expansion

  • Last update:  2021-04-08
  • I. Overview

    1. Problem description

    Obtain the value of a column corresponding to the horizontal expansion, and perform the calculation of the proportion of the value in the group. The following is an example of a template for illustration.

    The salesperson expands horizontally to obtain the sales volume of the salesperson Sun Lin column, and then calculate the proportion with the Sum column. That is to say, no matter which column Sun Lin is in, he can get his sales value. Results as shown below:

    1.png


    2. Realization ideas

    Use the level coordinates to obtain the sales volume corresponding to Sun Lin, and use the formula Cellx[!0]{conditional expression} to participate in the calculation. Because this example is horizontal expansion, the formula is Cellx[;!0]{conditional expression}.

    Note: The ";" sign is required before the "!" in the formula, don't forget it.

    II. Example

    1. Data preparation

    Create a new dataset ds2, and enter the query statement select * from Sales_Volume.

    2.png


    2. Report design

    Design the report as shown in the figure below, expand cell B1 horizontally, add formula to cell D2: B2[;!0]{B1 = "Sun Lin"} / C2, and set its format to percentage to retain two decimal places.

    3.png


    3. Effect preview

    Save the report, click pagination preview, the effect is as shown in the figure below:

    4.png

    Note: Support mobile terminal preview.

    III. Completed template

    The completed template can refer to: %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\BasicApplication\proportion_after_horizontal_expansion.cpt

    Click to download the template:

    proportion_after_horizontal_expansion.cpt


    Attachment List


    Theme: Report Features
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy