Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Unable to Recreate Seemingly Simple Visual

Hi,

 

I'm trying to recreate the below visual, but it seems impossible in Power BI, which is very hard to believe! I'm trying to stack Sales + Pipeline on one bar in a bar chart and compare it to another bar that is quota. This data is coming from three different tables, which are all related by employee name and date. Everything i've tried has either split it into 3 bars or stacked them all on top of each other, not the exact image below like I'm looking for. I even unioned all three tables together and used the legend and still didn't work. Any ideas would be greatly appreciated! 

 

  • Hi Anonymous ,

     

    We can try to create a calculated table as axis to meet your requirement:

     

    Calculated table:

     

    Axis = 
    FILTER (
        CROSSJOIN (
            DISTINCT ( 'Pipeline'[Fiscal Period] ),
            { "Sales&Pipeline", "Quota" },
            SELECTCOLUMNS ( { "Sales", "Pipeline", "Quota" }, "Legend", [Value] )
        ),
        [Value] = [Legend]
            || ( [Value] = "Sales&Pipeline"
            && [Legend] IN { "Sales", "Pipeline" } )
    )

     

    Measure(as value field):

     

    Measure = SWITCH(SELECTEDVALUE('Axis'[Legend]),"Sales",SUM(Sales[Sales]),"Pipeline", SUM('Pipeline'[Pipeline]),"Quota",SUM(Quota[Quota]))
    

     

     

     

     

    The Left chart is a Multiple Axis chart from appsource, it does not need a axis table, but we did not find an effective way to add gap between two bars.

     


    By the way, PBIX file as attached.


    Best regards,

     

4 Replies