Forum Discussion
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.
Hi Anonymous,
I didn't change my original measure, I just changed the icons.
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!
10 Replies
- FowmySuper 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" ) )- AnonymousNot 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- AnonymousNot 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
- v-xulin-mstfCommunity Support
Hi Anonymous
Is this what you want?
Create two measures as:
__diff = DATEDIFF(MAX('Table'[Delivery Date] ) , MAX('Table'[Approval Expiry Dae]),MONTH )Warning = IF( [__diff] <= 3 , [__diff]& " months" , [__diff] & " months" )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!
- AnonymousNot 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 insteadheres what I've tried
this is the dax measure
this is what im trying to do but cant add it to yours
- v-xulin-mstfCommunity Support
Hi Anonymous
Is this what you want?
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!