Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Show vertical bar chart without grouping items

I have data that spread across columns that I want to show in a vertical bar chart. The problem is the bar chart groups everything together because there really is no x-axis component to define.   ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  Anonymous ,

     

    The easiest way to do this is to go to the Query Editor, select all columns, and then select Unpivot Columns.

    However, you can also perform this operation in DAX, you can perform the following formula

    1. Create calculated table.

    Table 2 =
    UNION(
    SELECTCOLUMNS(
        'Table',
        "Year",2021,
        "Value",[Year 2021]),
    SELECTCOLUMNS(
        'Table',
        "Year",2022,
        "Value",[Year 2022]),
    SELECTCOLUMNS(
        'Table',
        "Year",2023,
        "Value",[Year 2023]),
    SELECTCOLUMNS(
        'Table',
        "Year",2024,
        "Value",[Year 2024]),
    SELECTCOLUMNS(
        'Table',
        "Year",2025,
        "Value",[Year 2025]))

    2. 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