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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.