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

How to get last month value

Let assume I have the following table

 

Portfolio bal.JPG

 

And I want to get only the last month value for each relevant customer. It should be dynamic relevant to the date I check the power bi visual. for example, if check the report today (11/16/2020) value should be the last month  (10/31/2019) value only. Not the sum of all value only value corresponding to last month. Thanks in advance

2 REPLIES 2
sekinod
Helper II
Helper II

@amitchandak 

Though it is not in the above table, Let assume all values up to the last month are there and how can I get last month's value from today.

amitchandak
Super User
Super User

@sekinod , Last date of last month

 

closingbalancemonth(Sum('Table'[Value]), dateadd(Date[Date],-1,month))

or

measure =

CALCULATE(sum(''Table''[total hours value]),previousmonth('Date'[Date]) , filter('Date','Date'[Date] =eomonth('Date'[Date],-1) )

 

complete last month

 

last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
previous month value = CALCULATE(sum(''Table''[total hours value]),previousmonth('Date'[Date]))

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.

Top Solution Authors