Forum Discussion
Date Difference with Filters
- 3 years ago
Hi Anonymous ,
You just need one measure for all of your requirements:
_projectLeadTime = AVERAGEX( SUMMARIZE( yourTable, yourTable[Project No.], "minStart", MIN(yourTable[Start Date]), "maxEnd", MAX(yourTable[End Date]) ), DATEDIFF([minStart], [maxEnd], DAY) )Here's the output when applied against different levels of dimensions:
Pete
Project No. | Task Lead Time | Project Lead Time |
AB10001 | 12 | 14 |
AB10001 | 12 | 14 |
AB10001 | 11 | 14 |
AB10001 | 11 | 14 |
AB10001 | 12 | 14 |
AB10002 | 43 | 74 |
AB10002 | 43 | 74 |
AB10002 | 41 | 74 |
AB10002 | 11 | 74 |
AB10002 | 12 | 74 |
AB10003 | 43 | 111 |
AB10003 | 43 | 111 |
AB10003 | 10 | 111 |
AB10003 | 72 | 111 |
AB10003 | 78 | 111 |
Hi Anonymous ,
I think you can simply do a summarize table of the above table i tried it my self with the below code, you have to replace the table name ,
For creating a table, you have to go to the modelling tab and click on the new table as shown below,
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
- NikhilChenna3 years agoSkilled Sharer
Hi Anonymous , If this solves your issue.
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!