Forum Discussion

mikemi's avatar
mikemi
Frequent Visitor
8 years ago

DAX relative date filtering

I am looking to create two relative date measures for the same field "Gross": Last 30 Days, and Quarter-To-Date.

I created a quick measure but unsure how to filter for the two relative dates above. The end goal is to create a table that shows "Gross" created in the last 30 days, and quarter-to-date (which I don't believe can be done without two separate measures if I want to include them in the same table).

 

Below is the quick measure where I was only able to select one date. I assume the IN { DATE(2018, 4, 27) section is the chunk that needs to be replaced.

 

Gross for Friday, April 27, 2018 = 
CALCULATE(
	SUM('Opportunity'[Gross]),
	'Opportunity'[Created Date] IN { DATE(2018, 4, 27) }
)

 

10 Replies

    • mikemi's avatar
      mikemi
      Frequent Visitor

      Thanks, Ashish_Mathur.

       

      I have the file ready to upload but not sure how to share as a link. Suggestions?

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Icon for Super User rankSuper User

        Hi,

         

        Upload the file to OneDrive/Google Drive and share the download link here.