Forum Discussion

kchan's avatar
kchan
Frequent Visitor
10 years ago
Solved

Time Intelligence Functions - Help (PREVIOUSQUARTER, PREVIOUSMONTH, etc)

Hi All,   I've been trying to get this working with my data with no success. I followed instructions found in the related posts but I keep coming up with a blank/wrong results.   I tried the basi...
  • v-haibl-msft's avatar
    10 years ago

    kchan

     

    For the Contoso Sales sample, I used following two measures to get the sales amount of previous quarter/month. I’ve uploaded my Power BI file here. Please take a look at it to see if there is any difference with yours.

    Sales_PreviousQuarter = 
    CALCULATE (
        SUM ( Sales[SalesAmount] ),
        PREVIOUSQUARTER ( 'Calendar'[DateKey] )
    )
    Sales_PreviousMonth = 
    CALCULATE ( SUM ( Sales[SalesAmount] ), PREVIOUSMONTH ( 'Calendar'[DateKey] ) )

     

    Best Regards,

    Herbert