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
zzzsou
Frequent Visitor

How to sort values by 1st x axis and 2nd axis twice

Hello,

 

<raw data> 

DatePart 
2022A
2022B
2022C
2023A
2023B
.... 

 

 

From this data table, I created bar graph( 1st x axis : date, 2nd x axis : part // Y axis : count of part)
I could sort by the first axis (date) in graph option, however I would like to sort by count of parts as well... in order to solve this issue, I added  a column with this formula below  to sort part coulmn with this formula but Cyclic dependencies error poped up.

 

count_part =
CALCULATE(
COUNT('table'[Part]),
FILTER('table',
'table'[Part]=EARLIER('table'[Part])
)
)

 

 

could you kindly help this issue please?

1 REPLY 1
Arul
Super User
Super User

@zzzsou ,

If you want to make sorting at this level you have to change year column to text if it is having only numbers and also I am not sure whether you used sort option in next level.

Arul_0-1679906749259.png

Thanks,

Arul

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


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.

Top Solution Authors