Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Using datesbetween

Hello! I Have the following problem, I have 3 columns: My initial Date, Final Date, and production between the dates, like the folowwing example: Initial Date Finish Date Production 0...
  • v-cherch-msft's avatar
    7 years ago

    Hi Anonymous

     

    You may add a column for the sample table:

    Days = DATEDIFF(Table[Initial Date],Table[Finish Date],DAY)

    Then you may get the measure and show all the dates included.

    Divide =
    CALCULATE (
        DIVIDE ( MAX ( Table[Production] ), MAX ( Table[Days] ) ),
        FILTER (
            GENERATE ( 'Calendar', Table ),
            'Calendar'[Date] >= Table[Initial Date]
                && 'Calendar'[Date] <= Table[Finish Date]
        )
    )
    

    Regards,

    Cherie