Forum Discussion

naveen73's avatar
naveen73
Icon for Helper III rankHelper III
2 years ago
Solved

Chart in Power BI

Hi,

 

I have a data set that looks a bit like in the screenshot below. I have also a link to my drive.

The dataset is upload to Power Query, then to Data model. Using DAX And PowerPivot the end goal is to have two columns:

  • One column will have the value one
  • The other column will have the mean of the tax year for the year. The year can be chosen with a dropdown.

This way it will visualize the difference between the tax and non-tax, so to speak.

In PQ I inserted a custom column with only the value one. Now, using the chart functionality in PowerPivot I am trying to build the chart and I just picked up and dragged legends below the chart. Just wondering if there is not a better way then to drag the legend as at some point I want to build this in Power BI.

 

 

 

 

 

Thanks,

 

Naveen

 

 

https://docs.google.com/spreadsheets/d/1-OUVkRz7o689k1ge9LuMzp0_SLazxSdI/edit?usp=drive_link&ouid=110294040238289903125&rtpof=true&sd=true

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi naveen73 ,

     

    I am sorry to inform you that I do not have permission to access the pbix link you provided, but I have applied for access. Please grant me access.

     

    I created the sample data from the screenshot you provided and added a column full of 1's.

     

    Unpivot CustomTax and Tax.

     

    Click close and apply.

     

    Drag year into the Slicer visual and select dropdown format.

     

    Select the clustered column chart, drag Attribute to the X axis, drag Value to the Y axis, select Average aggregation, and then drag Attribute to legend.

     

    pbix file is attached.

     

    If you have any further questions please feel free to contact me.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi naveen73 ,

     

    I am sorry to inform you that I do not have permission to access the pbix link you provided, but I have applied for access. Please grant me access.

     

    I created the sample data from the screenshot you provided and added a column full of 1's.

     

    Unpivot CustomTax and Tax.

     

    Click close and apply.

     

    Drag year into the Slicer visual and select dropdown format.

     

    Select the clustered column chart, drag Attribute to the X axis, drag Value to the Y axis, select Average aggregation, and then drag Attribute to legend.

     

    pbix file is attached.

     

    If you have any further questions please feel free to contact me.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

  • Hi Anonymous ,

     

    This is the solution. Actually, when I started with this excercise I wanted to know if inserting the column with 1 is good practice.

    What do you, or others, think?

     

    Thanks,

     

    Naveen

  • rquizon09's avatar
    rquizon09
    Frequent Visitor

    Hi,

     

    Is there any way to show 2 Line of Y axis on Clustered Bar Chart?

    Like this on Excel