Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Days calculating error

Hi.    I'm trying to make a calculation based on the difference between two dates (two days), but the result is not the one that is expected (in red), but shows as "infinite".  It seems to me that...
  • AlB's avatar
    7 years ago

    Hi Anonymous

     

    Try this for your measure, placing it in the values of a matrix with Month and Day on rows as you show. Table1 is the table containing Month and Day columns shown in the matrix visual.

     

     

    Calc Target =
    SELECTEDVALUE ( Table1[Day] )
        * DIVIDE (
            CALCULATE ( COUNT ( Table1[Day] ) - 1, ALL ( Table1[Day] ) ),
            [BaseValue]
        )

     

    Code formatted with