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
Ramyzo
Helper II
Helper II

Filter Using year number and Month of year

Greeting everyone ,
Im Kinda new to power BI , My data source coming from a cube ,
My issue here that i want to use a filter in power BI Based on the Month of year :  (Mars 2019  , April 2019  etc ...) , i notice in many tutorial that they use Date format in order to filter their data : MM/DD/YYYY

for my case my Date DIM Hieararchy is something like this : YEAR > QUARTER > MONTH > DAY of Month 

exp ( 2000>1>Mars>18)
I can provide Extra Explanation
Thanks in Advance

1 ACCEPTED SOLUTION

Usually PowerBI is smart enough to pick up that you have a date table and set it all up for you.

There are a couple of options here.  The first question is: does this table hold information other than the date?  If so, you can follow guides like this one to quickly create a full date dimension table.  This can be reused in any report you have too.  

 

If there's other data in the table, or you want to learn something new in PowerBI, you can concatenate the two columns into a new column.  Select your calendar table, click the "new column" button in the Home ribbon and use the following to concatenate month and year into this format: 3/17

Column = 'Calendar'[Month] & "/" & 'Calendar'[Year]

At this point, PowerBI likely thinks this is a string, so you can select the new column, go to the Modeling tab, and change the data type from Text to Date

View solution in original post

4 REPLIES 4
Cmcmahan
Resident Rockstar
Resident Rockstar

You can still filter based on a date hierarchy using MM/DD/YY.  Power BI is powerful enough to translate between the formats.

Hi 
Sorry i didn't undrestand (Since im kinda new ) Well  my sample of my date table is something like this  : 

Date id   Year  Quarter Month  Day   
1           2000    Q1            1

2           2000    Q1            2

3           2000    Q1            3

4           2000    Q1            4
As you can see i dont have the MM/DD/YY Fomat on  my table !  Dunno if there is a way to build it on Power BI

Usually PowerBI is smart enough to pick up that you have a date table and set it all up for you.

There are a couple of options here.  The first question is: does this table hold information other than the date?  If so, you can follow guides like this one to quickly create a full date dimension table.  This can be reused in any report you have too.  

 

If there's other data in the table, or you want to learn something new in PowerBI, you can concatenate the two columns into a new column.  Select your calendar table, click the "new column" button in the Home ribbon and use the following to concatenate month and year into this format: 3/17

Column = 'Calendar'[Month] & "/" & 'Calendar'[Year]

At this point, PowerBI likely thinks this is a string, so you can select the new column, go to the Modeling tab, and change the data type from Text to Date

Exactly that's what i have done ,  i have thought about adding a new column , thanks for the sentence ^^

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.