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
Anonymous
Not applicable

How to create a date filter using date column

Hi 

 

I have created date as two dimensions and its working fine but am expecting to create that dimension as one column. 


Step 1:

Last6Month = VAR six =1.* (MasterTable[MaxDate]-MasterTable[6Month])

RETURN if(MAX(SiteMasterTable[Date]) - MasterTable[Date] <six,"6M","Older")

Similarly I have created that date filter for Last12Month also.
 
Here am creating these two columns into one column but its not working as expected,
 
 Step2:
 
MonthSlicer = VAR six =1.* (MasterTable[MaxDate]-MasterTable[6Month])
 VAR eighteen =1.* (MasterTable[MaxDate]-MasterTable[18Month])
RETURN   if(MAX(SiteMasterTable[Date]) - MasterTable[Date] <six,"6M",
                if(MAX(SiteMasterTable[Date]) - MasterTable[Date] <six,"12M","Older"))
 
Here MasterTable[MaxDate] --> it contains max date from date column
MasterTable[6Month] & MasterTable[18Month] --> it contains 6M & 18M  date.
 
Could you please suggest me how to acheive this into one column.
 
Regards,
Yuvaraj
 
1 ACCEPTED SOLUTION

@Anonymous,

 

You may refer to the following posts.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

Based on your requirements, you could use the relative date slicer.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Yes. we can use relative date slicer also but am expecting without relative slicer, how we can able to acheive this scenario.

 

Regards,

Yuvaraj

@Anonymous,

 

You may refer to the following posts.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.