Forum Discussion

skitovich's avatar
skitovich
Helper I
6 years ago
Solved

Trouble with calculation(help)

Hello everyone. In the screenshot one, I show my test pattern. The task is to calculate the values ​​according to the formula below: The SUM"Count_of_sales" + Sum "Count of Calls" -100. It is neces...
  • v-gizhi-msft's avatar
    v-gizhi-msft
    6 years ago

    Hi,

     

    Please try this:

    constant = 
    IF (
        'Table'[Index]
            = CALCULATE (
                MIN ( 'Table'[Index] ),
                FILTER (
                    ALLSELECTED ( 'Table' ),
                    'Table'[Date] = EARLIER ( 'Table'[Date] )
                        && 'Table'[Manager] = EARLIER ( 'Table'[Manager] )
                )
            ),
        100 + DATEDIFF ( MIN ( 'Table'[Date] ), 'Table'[Date], DAY ),
        0
    )

    The result shows:

     

    Best Regards,

    Giotto