cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

How to create a dynamic measure that sums month's results based on date

Hi all

 

How can I have a dynamic measure that sums month's results based on date you select.

 

Let me do an example:

 

If you choose March 2020, the measure should sum January result + February result + March result

 

If you chosse June 2020,  

the measure should sum January result + February result + March result + April result + May result + June result

 

I have done it like this but it's not an elegant way because it's fixed:

 

March.JPG  How can I get this in one single measure as you select the month on the date slicer

 

Pbix https://1drv.ms/u/s!ApgeWwGTKtFdhzn31uwUJsSK0da4?e=NsXu7e

 

Thanks!

1 REPLY 1
Super User III
Super User III

Hello, @o59393, you may want to try

KPI YTD = SUMX ( DATESYTD ( Sheet1[Reporting period] ), [Crash Rate] )

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors