Forum Discussion

arjun0028's avatar
arjun0028
Regular Visitor
1 year ago
Solved

`Power BI Stacked Graph

In this graph we are getting the percentage distribution as same but facing an error that the data labels number distribution is the same.
  • v-karpurapud's avatar
    1 year ago

    Hi arjun0028 


    Welcome to the Microsoft Fabric Community Forum. 

    Regarding the visualization of course enrolments with the Financial Year on the X-axis, Week of the Month as the legend, and enrolment counts on the Y-axis, the issue arises because the data labels are not reflecting the correct percentage distribution within each financial year.
     This typically occurs when the DAX measure used does not properly account for the evaluation context of the visual.
     

    Please try the following DAX measure:

    Enrolment Percentage = 
    DIVIDE(
        SUM('Booking Data'[Enrol_Count]),
        CALCULATE(
            SUM('Booking Data'[Enrol_Count]),
            REMOVEFILTERS('Booking Data'[Week of Month])
        )
    )
    


     Create a chart with the X-axis representing the Financial Year, a legend indicating the Week of the Month, and values based on the new measure 'Enrolment Percentage'. Ensure that the data labels are configured to display either the percentage or the actual value as required.

    If this response resolves your query, kindly mark it as Accepted Solution to help other community members. A Kudos is also appreciated if you found the response helpful.

    Thank you for being part of Fabric Community Forum.

    Regards,
    Karpurapu D,
    Microsoft Fabric Community Support Team.