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
AgencyPowerBi
Helper III
Helper III

YOY Bar chart sorting

Hi,

 

I have a bar chart showing YOY Sales data per Category.

So I can show Sales in 2020 and 2021 for each Category in a bar chart.

 

I need to sort Categories by recent year and sales data, not by total sales in both year (which is a result if putting measure total sales in value).

 

How do I do this without coding, making summary tables, tinkering with data etc?

 

p.s.

If I can filter out top N for the recent year, even better. Unfortunatelly I don't seem to see easy way of doing it.. Excel rules still 😞

1 ACCEPTED SOLUTION

Ok, I managed to do what I need.

I created rank of Categories by Sales in 2021, put the rank in Tooltips and sorted on Tooltip. 🙂

 

I haved learned something today! 😄

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@AgencyPowerBi , is the Category on axis, Then you can sort on three dots.

if it legend it will on sort alphabetical or on sort column

 

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Ok, I managed to do what I need.

I created rank of Categories by Sales in 2021, put the rank in Tooltips and sorted on Tooltip. 🙂

 

I haved learned something today! 😄

These things I know how to do, unfortunatelly it is not what I need

 

Best way to do it would be to make a table, out of categories, sales and two years.. pivot the years so they would go into columns and make the visual.

 

Is it possible through dax?

For visualisation platform, simple things seem daunting 😕

 

Thank you very much

What_I_need.png

So this is what I need in the end.. 10 rows, sorted by 2021, and showing Sales in € 

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.