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
Twister8
Helper II
Helper II

sum values with the last date (month)

hello everyone,

 

I am new in PB and DAX, I need calculate the sum of values from the last month with data on my database, for example:

 

month      values

2016-1     1

2016-2     5

2016-3     10

2016-3     10

 

So I need return the 20 in my result.

1 ACCEPTED SOLUTION

HI,

 

Tks everybody for answers...

 

I solved:

LastMonth = IF(YEAR(TODAY())= YEAR('Fact'[Date]) && MONTH(TODAY())-1 = MONTH('Fact'[Date]);1;BLANK())

 

Mymeasure = CALCULATE(SUM('Fact'[Value]);'Fact'[LatMonth] =1)

View solution in original post

19 REPLIES 19

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.