Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0613· openaiHugging Face Suzhen/CodeChat

Power BI, I need to show the cumulative values for 4 Quarters (Field name Quarter…

  1. User

    Power BI, I need to show the cumulative values for 4 Quarters (Field name Quarter Reported) in percentage based on the field Score percentage in table Merged. eg. 50% 50% 50% 100% shall give results in graph as 50%, 50%, 50 %, 62.5%. I need to create measure which gives this result in line graph

  2. Assistant

    To create a measure to show the cumulative values in percentage based on the Score percentage field for each Quarter Reported in a line graph, you can follow these steps:

    1. Open your Power BI report.
    2. Go to the "Fields" pane and select the table Merged.
    3. Click on "Modeling" in the top menu.
    4. Click on "New Measure" in the "Calculations" group.
    5. In the formula bar, enter the following measure formula:
    Cumulative Percentage =
    VAR CurrentQuarter = SELECTEDVALUE('Merged'[Quarter Reported])
    RETURN
        CALCULATE (
            DIVIDE (
                SUM ( 'Merged'[Score percentage] ),
                CALCULATE (
                    SUM ( 'Merged'[Score percentage] ),
                    ALLSELECTED('Merged'[Quarter Reported]),
                    'Merged'[Quarter Reported] <= CurrentQuarter
                )
            ),
            ALLSELECTED()
        )
    
    1. Press Enter to create the measure.

    Now, you can create a line graph using the Quarter Reported field on the X-axis and the Cumulative Percentage measure on the Y-axis. The line graph will display the cumulative values in percentage for each quarter as desired.

    Note: Make sure that you have the 'Merged' table selected and the appropriate relationships have been established between the tables if there are multiple tables in your report.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.