Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
naveen73
Helper III
Helper III

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.

 

naveen73_0-1711665093576.png

naveen73_2-1711665212779.png

 

 

 

 

Thanks,

 

Naveen

 

 

https://docs.google.com/spreadsheets/d/1-OUVkRz7o689k1ge9LuMzp0_SLazxSdI/edit?usp=drive_link&ouid=11...

1 ACCEPTED SOLUTION
v-huijiey-msft
Community Support
Community Support

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.

vhuijieymsft_0-1711681619683.png

 

Unpivot CustomTax and Tax.

vhuijieymsft_1-1711681636106.png

vhuijieymsft_2-1711681636109.png

 

Click close and apply.

 

Drag year into the Slicer visual and select dropdown format.

vhuijieymsft_3-1711681665918.png

 

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.

vhuijieymsft_4-1711681665923.png

 

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!

View solution in original post

2 REPLIES 2
naveen73
Helper III
Helper III

Hi @v-huijiey-msft ,

 

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

v-huijiey-msft
Community Support
Community Support

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.

vhuijieymsft_0-1711681619683.png

 

Unpivot CustomTax and Tax.

vhuijieymsft_1-1711681636106.png

vhuijieymsft_2-1711681636109.png

 

Click close and apply.

 

Drag year into the Slicer visual and select dropdown format.

vhuijieymsft_3-1711681665918.png

 

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.

vhuijieymsft_4-1711681665923.png

 

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!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.