Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Calculating Same Period Last Month !!!

Hi Geniuses, 

 

I have created a measure to calculate MTD sales of my product category now I want to calculate sales of same premiod last month to compare. My Dax formula is returning the same result as current month MTD. 

PREMIUN SPLM = CALCULATE([MTD PREMIUM Sales],
DATESBETWEEN('Calendar'[Date],DATE(YEAR( TODAY() ), MONTH( TODAY() )-1, 01), TODAY()-30 )
)

Can you please help me how I can fix this?
 

 

 

7 Replies

  • Tanushree_Kapse's avatar
    Tanushree_Kapse
    Icon for Impactful Individual rankImpactful Individual

    Hi Anonymous ,

     

    Try this measure:

     

    PREMIUN SPLM=  

    CALCULATE([MTD PREMIUM Sales],
    PREVIOUSMONTH(DATESMTD('Calendar'[Date])))
     
    Mark this as a solution if I answered your question.
    Kudos are always appreciated.
    Thanks
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Tanushree_Kapse,

      It didn't work either. Returned the same value as current month. 

      Thanks 

    • selimovd's avatar
      selimovd
      Icon for Most Valuable Professional rankMost Valuable Professional

      Hey Anonymous ,

       

      is that still ongoing or could you solve the issue?

      If it's still unsolved you have to upload the file again as it expired.

       

      Best regards

      Denis