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
selected_
Helper IV
Helper IV

Calculate expire date

I have products with  that are coming with expire date I want

 

How is this measure made that amount products that expering <30 days like those below?

 

pbi_flow_7

 

 

6 REPLIES 6
challoran87
New Member

Which visualization did you use? 

v-shex-msft
Community Support
Community Support

Hi @selected_,

Please provide some dummy data and expected results to help us clarify your scenario, then we can test to coding formula on it.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
VijayP
Super User
Super User

@selected_ 

https://www.youtube.com/watch?v=3bV9BfB3_Oc&t=1s Watch this video to create Ageing of the Expiry Date and you can easily monitor the products Expiry Date

If you find this solution as you require then mark this as solution and share your Kudoes

Vijay Perepa




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


pranit828
Community Champion
Community Champion

Hi @selected_ 

 

Use the below measure to get teh days left.

Days_left = DATEDIFF(selectedvalue(table[expire_date]),TODAY(), DAY)

 

Now for each of these charts use filter condition on days left as

1. Less than or equal to 30

Less than or equal to 60 and greater than 30

Less than or equal to 180 and greater than 60

greater than 180

pranit828_0-1600562741907.png

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

@pranit828 

 

your calculation show blank

You need two measures OR combine intoone. one to calc the expired date them put into if statement:

 

Days between = DATEDIFF(table[date],TODAY(), DAY)
DATEDIFF (<start_date>, <end_date>, <interval>)

then with If stament 
IF([Days between]>= 30, "YES","NO') 

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.