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

3 month date warning

Hi, 

 

I have two dates in my data table, one is the actual date and the other date is an expiry date for approval. 

I want the table to show me that when there is a 3 month difference between the two there is some of warning or count down in another column or even icons.

 

one date column is called Delivery date which is the main date and the other date column is called Approval expiry date.

Maleehah_0-1628603806972.png

 

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

I didn't change my original measure, I just changed the icons.
vxulinmstf_0-1628845857499.png

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

View solution in original post

10 REPLIES 10
v-xulin-mstf
Community Support
Community Support

Hi @Anonymous

 

Is this what you want?

vxulinmstf_0-1628759485327.png

Create two measures as:

__diff = DATEDIFF(MAX('Table'[Delivery Date] ) , MAX('Table'[Approval Expiry Dae]),MONTH )
Warning = 
 IF( [__diff] <= 3  ,  [__diff]& " months"  , [__diff] & " months"  )

vxulinmstf_1-1628759564236.png

The demo is attached, please try it.

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

Anonymous
Not applicable

Hiya thanks for the reply, 
I've tried to use your method however, this is the result i'd like and I am not able to do that, I was wondering if theres a way to add to @Fowmy method and adding amber for that range instead 

 

heres what I've tried 

Maleehah_0-1628765605913.png

this is the dax measure 

Maleehah_1-1628765623238.png

this is what im trying to do but cant add it to yours

 

Hi @Anonymous

 

Is this what you want?

vxulinmstf_1-1628835904669.png

Please try the attached demo.

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

Anonymous
Not applicable

Any chance you could screenshot the Measure as Im waiting for the new update to be approved therefore cannot open the file 

Hi @Anonymous,

 

I didn't change my original measure, I just changed the icons.
vxulinmstf_0-1628845857499.png

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

Anonymous
Not applicable

Oh right okay thanks

Hi @Anonymous

 

Is your issue solved? If the issue has been solved, please adopt the solution to help others.

Thanks! 😉

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

 

 

Fowmy
Super User
Super User

@Anonymous 

You can create  a measure as follows:

Warning = 
var __diff = DATEDIFF(MAX(Table4[Delivery Date] ) , MAX(Table4[Apporval Date]),MONTH )

return
IF( HASONEVALUE(Table4[Delivery Date] ),
    IF( __diff <= 3  , "🔴 " & __diff & " months"  ,"🟢 " & __diff & " months"  )
)

Fowmy_0-1628605294895.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

thank you.

Is there a way to add amber for the months which are in those 3 months and keep red for all the dates that are way out of the 3 months range. 
Also how can i sort the results so that all the positives are together and all the negatives are together 

Anonymous
Not applicable

@Fowmy Is there a way to add amber for the dates which are within the three months but keep red for everything that has gone over the date and is expired?

And to sort it in order 

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.