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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
negbc
Helper I
Helper I

Date Table Sorting and Grouping

I have a standard date table and added columns to display Quarter, Quarter-Year, and then a Date Sort Column with the dax formula:

Date Sort Column =
'Date Table'[Year]*12 + 'Date Table'[Month]
 
However when I use the Quarter-Year column in a visual, it looks to separate the value for the months insteading of grouping the value for the quarter-year. 
 
negbc_1-1738866738511.png

Date sort column is removed but still multiple rows for "Q4"

negbc_2-1738866780232.png

 

 

negbc_3-1738867055482.png

 

It makes sense that when the date sort column is added to visual to have more than 1 row because the values are different. I'm not sure why Qtr-Year would cause this. Any insights? I need to use the column to show trending data across different years.
 
TIA

 

2 ACCEPTED SOLUTIONS
GiuseppeMR
Frequent Visitor

Is the date sort column used to define a custom sort of this visual?

If so, this implies that the granularity of the visual includes this dimension, even if the sort column is not visible.

 

Giuseppe

View solution in original post

Yes I use the date sort column to sort other columns such as Qtr-Year. With what you are saying, I need a calculated sort column that uses quarter instead of month. That way it will have the same granularity..

(OLD) Date Sort Column =
'Date Table'[Year]*12 + 'Date Table'[Month]

(NEW) 
Date Sort Column =
'Date Table'[Year]*12 + 'Date Table'[Qtr]
 
@GiuseppeMR Thank you!

View solution in original post

7 REPLIES 7
parry2k
Super User
Super User

@negbc is Qtr-year column sorted by another column? Can you remove that sorting and then check?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Yes, it is sorted by the Date Sort Column, if not the Qtr-Year column doesn't go chronologically as shown below

 

 

negbc_1-1738939946793.png

 

GiuseppeMR
Frequent Visitor

Is the date sort column used to define a custom sort of this visual?

If so, this implies that the granularity of the visual includes this dimension, even if the sort column is not visible.

 

Giuseppe

Yes I use the date sort column to sort other columns such as Qtr-Year. With what you are saying, I need a calculated sort column that uses quarter instead of month. That way it will have the same granularity..

(OLD) Date Sort Column =
'Date Table'[Year]*12 + 'Date Table'[Month]

(NEW) 
Date Sort Column =
'Date Table'[Year]*12 + 'Date Table'[Qtr]
 
@GiuseppeMR Thank you!
parry2k
Super User
Super User

@negbc the % you are showing in the visual, is it a column or a measure?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

A measure, the rest are calculated columns from the date table.

Can you attach pbix with dummy data to debug this ?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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