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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ironboy0418
Helper II
Helper II

How to set a default sorting for a chart?

I do have two slicers that are inter-dependent with each other:

 

ironboy0418_0-1680410948725.png

ironboy0418_1-1680410971922.png

 

The objective is whichever I select weekly, monthly, or quarterly in the relative slicer. The below report will be sort not by its values rather by its relative date like the example below. The concern with this is that I always manually sort it everytime I select another view:

 

ironboy0418_2-1680411095921.png

 

Is there a way we can sort it automatically using dax? or any other method?

 

Thanks in advance.

 

 

 

 

 

4 REPLIES 4
MohammadLoran25
Solution Sage
Solution Sage

Hi @ironboy0418 ,

Click on your field (Year-month which you have put on you X-Axis)

Then from the upper ribbon in the "Column Tools" select the "Sort By Column" section and sort it by the column YearMonth (if you do not have YearMonth Field you can Create it as a calculated column in your datetable as below):

 

 

CONVERT(FORMAT(DateTable[Date],"YYYYMM"),INTEGER)

 

 

 

If this answer solves your problem, give it a thumbs up and accept it as a solution so the others would find what they need easier.

Regards,

Loran

 

Thanks @MohammadLoran25 It doesn't work this way please see below for reference:

 

ironboy0418_0-1680477053982.png

 

I could not get what you meant by the picture. Could you please wxplain more what is wrong with it exactly?

@ironboy0418  Thanks.

@MohammadLoran25 It didn't achieve the objectives even if I did the above recommendation of yours

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.