Forum Discussion

SMBM's avatar
SMBM
Frequent Visitor
2 years ago
Solved

Creating Calculated Column with Related Table and DATEADD

I have a dimensions table that contains a list of all skus in a system.  One of the dimensions is the date that the sku was introduced.  It has a relationship with a fact table that has all transacti...
  • jdbuchanan71's avatar
    2 years ago

    SMBM 

    I think it should work if you just add 365 to the [Introduction Date].  Does this give you what you are looking for?

    REVENUE_WITHIN_12_MONTHS_OF_INTRODUCTION =
    IF (
        AND (
            RELATED ( 'Material Data'[INTRODUCTION_TYPE] ) = "Public Release",
            AND (
                RELATED ( 'Material Data'[INTRODUCTION_DATE] ) + 365 >= 'Transactional Data'[BILLING_DATE],
                RELATED ( 'Material Data'[INTRODUCTION_DATE] ) <= 'Transactional Data'[BILLING_DATE]
            )
        ),
        'Transactional Data'[REVENUE],
        BLANK ()
    )