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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.