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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.