Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
o59393
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
CNENFRNL
Community Champion
Community Champion

Hello, @o59393, you may want to try

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

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.