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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
schoden
Post Partisan
Post Partisan

Relative Date Filter

Hi Community, 

 

Why am I not getting month number as  1, 2, 3, 4 or -1, -2, -3  beyound or before Current month 0.

 

 

The DATEDIFF in the column is specified as MONTH still I am getting Days 

 

Relative Date.JPG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@schoden , I am assuming that is a column and you are aggregating it visual

 

Try a measure

Measure = datediff(Min(Date[Date]) , Today(), Month)

 

or

 

Measure = datediff(Max(Date[Date]) , Today(), Month)

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@schoden , I am assuming that is a column and you are aggregating it visual

 

Try a measure

Measure = datediff(Min(Date[Date]) , Today(), Month)

 

or

 

Measure = datediff(Max(Date[Date]) , Today(), Month)

@amitchandak  Yes it is column , as I need to give user the flexibilty in a slicer to choose the month number to go back or forward.

 

In a measure We can't put in slicer.

 

 

@schoden , I am confused. In a column, we can not use a slicer. In measure, we can.

 

Or you do not want to use slicer?

Thanks @amitchandak  as awalys .. I changed the data category as MAX/ MIN and worked.

 

Yes as a slicer shown in Pic is what I wanted.

 

slicer.JPG

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.