Forum Discussion

gladies123's avatar
gladies123
Icon for Helper I rankHelper I
5 years ago
Solved

Reg: same date occurring multiple times need to display expected hours single time

hi,   Need a help to display a expected hours  which is occurring multiple times but it should be displayed once for those similar dates. i have attached picture for your reference.   note:i have...
  • Syndicate_Admin's avatar
    5 years ago

    Don't @gladies123,

    First create an index column;

    Next, create 4 columns as follows:

    Time = 
    var _search=SEARCH("(",'Table'[jira entry date],1,0)
    Return
    MID('Table'[jira entry date],_search+1,6)
    Date = 
    var _search=SEARCH("(",'Table'[jira entry date],1,0)
    Return
    LEFT('Table'[jira entry date],_search-1)
    _Hour = LEFT('Table'[Actual Hours],SEARCH("hr",'Table'[Actual Hours],1,0)-1)
    Expected Hours = 
    var _latertime=CALCULATE(MAX('Table'[Time]),FILTER('Table','Table'[Index]>EARLIER('Table'[Index])&&'Table'[Date]=EARLIER('Table'[Date])))
    Return
    IF(DATEDIFF('Table'[Time],_latertime,HOUR)<=3 && 'Table'[Index]=MINX(FILTER('Table','Table'[Date]=EARLIER('Table'[Date])),'Table'[Index]),CALCULATE(SUM('Table'[_Hour]),FILTER('Table','Table'[Index]>=EARLIER('Table'[Index])&&'Table'[Date]=EARLIER('Table'[Date]))),BLANK())

    And you'll see:

    v-kelly-msft_0-1617699142176.png

    For the related .pbix file, see pls Attachment.

    Saludos
    Kelly

    Did I answer your question? Mark my position as a solution!