Forum Discussion

casea14's avatar
casea14
Regular Visitor
8 years ago

DAX FUNCTION HELP

 

I have data that looks something like the above, I want to create the column highlighted in yellow with a DAX function. The value that would be returned would be the prior quarter revenue (which in most cases is not on the row directly above it).

 

On thoughts on how I could accomplish this?

 

Thank you!

 

 

2 Replies

  • Can you try this formula

    Prev = CALCULATE(SUM(Table1[Revenue]),SAMEPERIODLASTYEAR(Table1[Qtr EndDate]))

    Make sure that QtrEndDate column is a date column

    • casea14's avatar
      casea14
      Regular Visitor

      Hasan thanks for your reply..I used the same formula you provided below except instead of the SAMEPERIODLASTYEAR I used the PREVIOUSQUARTER function and no results are returned. I dont get an error but the column is blank. (It's prior quarter I am looking for and not same period last year). Your formula results in a blank column as well (no errors though).