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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mmunozi
Frequent Visitor

Order by Chart by Category and Product

I have tried to sort the products by the “Ventas” measure but within the category but I have not been able to stay as shown in the first graph I would like to achieve the ordered result of the second graph but within each category. I created a measure to sort if well in a matrix shows what is desired not in a graph.

 

He intentado ordenar los productos por la medida de “Ventas” pero dentro de la categoría, sin embargo, no he podido mantenerlo como se muestra en el primer gráfico. Me gustaría lograr el resultado ordenado del segundo gráfico pero dentro de cada categoría. Creé una medida para ordenar si bien en una matriz muestra lo que se desea, no en un gráfico.

Rank dentro de cate = if(ISINSCOPE(Productos[NombreProducto]),IF(ISBLANK([Ventas]),BLANK(),
RANKX(ALLSELECTED(Productos[NombreProducto]),[Ventas],,DESC,Dense)), BLANK())

 

 

mmunozi_0-1711684309710.png

 

My goal is like this :

mmunozi_0-1711751067075.png

 

 

https://drive.google.com/file/d/1R_q-q4dm-_zlCKaUixGNwtjIeOVbXXe-/view?usp=sharing  

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You do not need the Rank measure.  I switched to a Table visual and sorted by the Product column in ascending order and then by the Vestas field in descending order.  I then switched back to the Clustered Column chart visual.  PBi file attached.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

You do not need the Rank measure.  I switched to a Table visual and sorted by the Product column in ascending order and then by the Vestas field in descending order.  I then switched back to the Clustered Column chart visual.  PBi file attached.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you Sr. your the best

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.