Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

Double Stacked Bar Graph

Hello friends, I need your help, I am new to Power BI and I have a problem with stacked bars, the problem is that I have to 3 measures, 1 measure that is a budget, which goes alone, another measure that is what is spent + what is projected, obviously these 2 measures must be stacked and that are related to the measure of budgets. currently I am graphing the measurements by separators, on the 1 hand only the budget and on the other hand the 2 stacked measures, I have to move the length manually, but when updated, I lose the relationship and it messes them up again. ideally, they should be in a single graph, but I can not leave them as I want. the photo I show is like I need them to be in 1 only graph. grateful from now on with the solutions.

apiladas 1.png

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Syndicate_Admin ,

    Click Home - Enter data. to create a table.

    Create measure.

    Gastado&Liberadas =
    IF(
    MAX('Table2'[Group])="Gastado&&Liberadas",0,[$ Liberadas S/Fact])
    PPTO =
    IF(
        MAX('Table2'[Group])="PPTO",0,[PPTTO])

    Result:

     

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • VijayP's avatar
    VijayP
    Community Champion

    Syndicate_Admin 

     

    It might be possibel based the datamodel one created . For Example if you look at below snapshot

    the Table structure created to accomodate values the you want in a single graph for Budget and Actul+Forecast

    If you can share the pbix , I may try to help you with more details

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Syndicate_Admin ,

    Here are the steps you can follow:

    1. Use Enter data to create a table.

    2. Create measure.

    Stacked1 =
    IF(
    MAX('Table2'[Group])="PPTO",0,[PPTTO])
    Stacked2 =
    IF(
        MAX('Table2'[Group])="Gastado&&Liberadas",[Gastado],[$ Liberadas S/Fact])
    
    

    3. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      Estimado Liu Yang:

      reviewing the steps to follow, I do not know how to create or edit the groups in step 1. you can indicate some forum or video to see the steps, I would appreciate it. thank you now.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi  Syndicate_Admin ,

        Click Home - Enter data. to create a table.

        Create measure.

        Gastado&Liberadas =
        IF(
        MAX('Table2'[Group])="Gastado&&Liberadas",0,[$ Liberadas S/Fact])
        PPTO =
        IF(
            MAX('Table2'[Group])="PPTO",0,[PPTTO])

        Result:

         

         

        Best Regards,

        Liu Yang

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.