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
Anonymous
Not applicable

Track Expiration Dates

Hello everyone, 

 

I got these 3 columns, I need your help in calculating the product´s usefull life until today (every actual day), and tracking with a mueasure  of how  many products are over 80% of usefull life, and under 50%

I calculated this columns, but it seems that doesn´t work with visualizations, thats why I need measures. 

Actual_Date = TODAY ()

Usefull_life_today =Table1 [expiration date] -  Table1 [Actual_Date]

Total Usefull life = Table1 [ production life] - Table1 [expiration date]

% usefull life =Table1 [ Usefull_life_today]/ Table1 [Total Usefull life]

 

The result may be 

over 80%  50 items

under 50%  34 items

OIOU.PNG

 

I accept any suggestions

 

Thanks

1 ACCEPTED SOLUTION
Thejeswar
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

To get the no of values below 50% and above 80%, you can use the following 2 measures

 

Less than 50% Usefullife = IF(ISBLANK(CALCULATE(COUNT('Item expiry'[% usefull life]),'Item expiry'[% usefull life]<0.5))=TRUE(),0,CALCULATE(COUNT('Item expiry'[% usefull life]),'Item expiry'[% usefull life]<0.5))
Greater than 80% Usefullife = IF(ISBLANK(CALCULATE(COUNT('Item expiry'[% usefull life]),'Item expiry'[% usefull life]>0.8)) =TRUE() ,0,CALCULATE(COUNT('Item expiry'[% usefull life]),'Item expiry'[% usefull life]>0.8))

The Below screenshot shows the Available life, Total Life, Useful life % and the measure values

life_perc.PNG

 

 

Hope this helps!!!

View solution in original post

1 REPLY 1
Thejeswar
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

To get the no of values below 50% and above 80%, you can use the following 2 measures

 

Less than 50% Usefullife = IF(ISBLANK(CALCULATE(COUNT('Item expiry'[% usefull life]),'Item expiry'[% usefull life]<0.5))=TRUE(),0,CALCULATE(COUNT('Item expiry'[% usefull life]),'Item expiry'[% usefull life]<0.5))
Greater than 80% Usefullife = IF(ISBLANK(CALCULATE(COUNT('Item expiry'[% usefull life]),'Item expiry'[% usefull life]>0.8)) =TRUE() ,0,CALCULATE(COUNT('Item expiry'[% usefull life]),'Item expiry'[% usefull life]>0.8))

The Below screenshot shows the Available life, Total Life, Useful life % and the measure values

life_perc.PNG

 

 

Hope this helps!!!

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.