Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Revenue Formula

I have this table: I didn't post revenue amounts for security reasons, but the column is just called "revenue" and there is an amount associated with each invoice date. What I'm trying to ...
  • v-yuta-msft's avatar
    8 years ago

    Hi mrainey,

     

    It's a classic running total question. Create a measure and use DAX formula like pattern below:

    Result =
    CALCULATE (
        SUM ( table[value] ),
        ALLEXCEPT ( table, table[Co] ),
        FILTER (
            table,
            table[Invoice Date]
                >= MAX ( table[Invoice Date] ) - 4
                && table[Invoice Date]
                    <= MAX ( table[Invoice Date] - 1 )
        )
    )
        * 4
    

    Regards,

    Jimmy Tao