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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
tebtim19
Helper IV
Helper IV

Date Sortfo

Is anyone here know how to sort date for my slicer.

Doesn't look like sorted

tebtim19_0-1615566154984.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @tebtim19 ,

 

Sort Year Month column by Year Month# using sort by Column option

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hello @tebtim19 ,

 

You can Right click on column in data View and sort asc and Desc.

 

Let me know if this works for your date column.

 

Hi I tried that but it doesnt work. It's also weird that I can't see my date tabel in Query

Anonymous
Not applicable

Hello @tebtim19 

 

Is it calculated column? if yes, you can't see in query editor

Its a calculated table 

 

Dates =
ADDCOLUMNS (
CALENDAR ( DATE ( 2012, 1, 1 ), DATE ( 2021, 12, 31 ) ),
"Year", YEAR ( [Date] ),
"Month", FORMAT ( [Date], "MMMM" ),
"Month #", MONTH ( [Date] ),
"Year Month", YEAR ( [Date] ) & " " & FORMAT ( [Date], "MMMM" ),
"Year Month #", YEAR ( [Date] ) * 100 + MONTH ( [Date] )
)
Anonymous
Not applicable

Hello @tebtim19 ,

 

Sort Year Month column by Year Month# using sort by Column option

Hi Thank you this solve my problem.

I have one more thing to ask.

 

I am trying to get the total number of male current employees. 

Males = COUNTROWS(FILTER('SAP Table'[Gender] = "Male"))
 
But everytime I filtered it with my year month slicer it doesn't seems to work. 
I need to this so I could also get the Average of Male. Hopw you can help 
Anonymous
Not applicable

Hello @tebtim19 ,

Try this 

males = CALCULATE(COUNTROWS(FILTER(SAP Table,SAP Table[Gender]="Male")),ALLSELECTED(Dates[Year Month]))
 

Hi Still doesn't work when I select 2021 Feb I only got 3 males, which is supposed to be 209. I think the only number counter is the count of male added, but what I need is the total number of male filtered by month year.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.