Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only

How to have the same maximum of a sum, when we have a legend column in a stacked bar chart ?

  • 1.  How to have the same maximum of a sum, when we have a legend column in a stacked bar chart ?

    Posted 6 days ago
    Edited by Nicole Efanda yesterday

                                                  Hello,

                   The values of the same measure seems to be different, when the parameters of the visuals are different.

                   The data come from a table in Project Online. It is resource demands day by day. I have several lines for each day because of many projects and many resources

                   I calculate the sum of values day by day and take the maximum of this sum on the period of a month in that case. I have calculated this with several DAX formulas. For exemple :

    ResourceDemand Dailypeak 2 =

        MAXX(

            KEEPFILTERS(VALUES(timeSet[TimeByDay])),

            CALCULATE(

                SUM(

                    ResourceDemandTimephasedDataSet[ResourceDemand]

                ),

                DISTINCT(

                    ResourceDemandTimephasedDataSet[TimeByDay]

                )

            )

        )

                   Then I use a line and stacked column chart without any column legend. The maximum of the column is correct. 

    Azelie_0-1659626629666.png

     

                   In another visual I use a line and stacked column chart with Project Name in the column legend. The maximum is bigger.

    Azelie_1-1659626678177.png

     

    In the second visual it takes the maximum of the sum project by project. 

    Could you help me to have the correct values with Project Name in column legend ?

       Thank you in advance for your help 

    Nicole 



    ------------------------------
    Nicole Efanda
    Developer
    Saint Jean des Champs
    ------------------------------