Forum Discussion
Anonymous
6 years agoNot applicable
Calculating a Total Based on Start/End Dates
I have a data set that includes Start/End Dates, Site, Object, and ObjectAttributeX (a number equal to or less than 1). I need to calculate Total ObjectAttributeX for a Site. If an Object's Attribu...
Greg_Deckler
Community Champion
6 years agoOK, should be something along the lines of:
Column =
VAR __Table = FILTER(ALL('Table'),[Start Date]<=[Date] && ('Table'[End Date]>=[Date] || ISBLANK('Table'[End Date])))
RETURN
SUMX(__Table,[ObjectAttributeX])
Attached PBIX file
Anonymous
6 years agoNot applicable
Makes sense. I understand how my statement saying Power BI does not support duration is misleading. It certainly does it just has do be in decimal format and then converted to duration in the article you posted. This is essentially what the post I included states as well though I understand saying duration is not supported is technically incorrect. Thanks for the learning moment 🙂
Anonymous
I think your answer may be found in this thread: https://community.powerbi.com/t5/Desktop/Count-of-Open-or-Closed-items-based-on-2-different-Date-Columns/td-p/739189