Forum Discussion
Data-junkie
6 years agoRegular Visitor
Differnece between two dates with maxx and filter
Hi Everyone, Hope your all keeping well and sane.
I have been trying to find out how i can work this out.
i have a column that works out the MAXX date a toner was used from a site stock per site. That works fine
This is my calculation
Last Fitted Date Site =
VAR ProductCode = 'All Stock'[ProductCode]
RETURN
VAR LocCode = 'All Stock'[LocationCode]
RETURN
Maxx(
Filter(all('New Parts fitted' ), 'New Parts fitted'[Product Code] = ProductCode && 'New Parts fitted'[Site Code] =LocCode), 'New Parts fitted'[ActualOnSiteDate])
I now want to know how many days each toner has been held in stock per each site. I have a column that gives me the last date a toner was stored called 'New Parts fitted'[Last Rep Date]
So i want to filter the product code and site code and divide the 'New Parts fitted'[Last Rep Date] by TODAY() to me the differnece in days, but can i get it to work, oh no.
Any help much appreciated.
Dean
1 Reply
- dedelman_clng
Community Champion
Hi Data-junkie - can you share your pbix or give more info about your model and provide sample data? You should probably be able to do something similar to what you have already done, but a lot depends on what your model and data look like.
David