Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Previousmonth calculation showing blank

Hi,

 

i am using the below for previousmonth calculation, but result is always blank.

Syntax: 

PreviousMonth = CALCULATE(SUM('Monthly Speed - All Operators b'[Download Speed Mbps]),PREVIOUSMONTH('Monthly Speed - All Operators b'[Aggregate Date]))
 
sample for the dataset in the below link
 
 
  • nandukrishnavs's avatar
    nandukrishnavs
    6 years ago

    Anonymous 

     

    PreviousMonth =
    CALCULATE (
        SUM ( 'Monthly Speed - All Operators b'[Download Speed Mbps] ),
        PREVIOUSMONTH ( 'Monthly Speed - All Operators b'[Aggregate Date].[Date] )
    )

     

     



    Did I answer your question? Mark my post as a solution!
    Appreciate with a kudos
    🙂

5 Replies

  • nandukrishnavs's avatar
    nandukrishnavs
    Icon for Community Champion rankCommunity Champion

    Anonymous 

     

    This is because of the date hierarchy. 

     

     

    PreviousMonth =
    CALCULATE (
        SUM ( 'Monthly Speed - All Operators b'[Download Speed Mbps] ),
        PREVIOUSMONTH ( 'Monthly Speed - All Operators b'[Aggregate Date].[Date] )
    )

     



    Did I answer your question? Mark my post as a solution!
    Appreciate with a kudos
    🙂

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      thanks you nandu, but it worked now, but i noticed that aggregate date format inside matrix changed.= and not showing year/month any more. 

       

      is there a way to handle this and keep the format as it is?

      • nandukrishnavs's avatar
        nandukrishnavs
        Icon for Community Champion rankCommunity Champion

        Anonymous  - Yes I have modified the above reply. Please check that.