Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Use dynamic measures to replicate Excel bar chart

Hi everyone,   New to Power BI here and I am stuck with this chart.    I want to replicate this win rate chart that I had created in Excel:     Oct 2022 Oct 2021 Overall Win Rate 15.0%...
  • v-yanjiang-msft's avatar
    3 years ago

    Hi Anonymous ,

    According to your description, here's my solution.

    1.Create a new table. Don't make relationship between the two tables.

    2.Create a measure. In the code, [Overall Win Rate], [Supplier 1 Win Rate] etc. are all measures.

    Measure =
    SWITCH (
        MAX ( 'Category'[Category] ),
        "Overall Win Rate", [Overall Win Rate],
        "Supplier 1 Win Rate", [Supplier 1 Win Rate],
        "Supplier 2 Win Rate", [Supplier 2 Win Rate],
        "Supplier 3 Win Rate", [Supplier 3 Win Rate]
    )
    

    Put the new Category column in X-axis, measure in Y-axis and Year-Month column in Legend, get the result:

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

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