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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mrichman
Regular Visitor

How to calculate value from start to present date/month only?

Hi Community, 

 

I would like to achieve the following. How can I calculate value from start to present date/month only? Thanks in advance!

 

Example

                 Value 1     New Measurement

Jan 2021        1            1

Feb 2021        2            2

Mar 2021       3             3

Apr 2021        4             4 

May 2021       5             5

Jun 2021         6            6

Jul 2021          7            7 

Aug 2021        8            8

Sep 2021         9           9

Oct 2021         10

Nov 2021         11

Dec 2021         12 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@mrichman , If you have date the create formula like

 

Till Today =
var _max = today()
var _min = maxx(allselected('Date'), 'Date'[Date])
return
calculate(sum(Table[Value]), filter('date', 'Date'[Date] >=_min && 'Date'[Date] <=_max && 'Date'[Date] ))

 

or


Till last month =
var _max = eomonth(today(),-1)
var _min = maxx(allselected('Date'), 'Date'[Date])
return
calculate(sum(Table[Value]), filter('date', 'Date'[Date] >=_min && 'Date'[Date] <=_max && 'Date'[Date] ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@mrichman , If you have date the create formula like

 

Till Today =
var _max = today()
var _min = maxx(allselected('Date'), 'Date'[Date])
return
calculate(sum(Table[Value]), filter('date', 'Date'[Date] >=_min && 'Date'[Date] <=_max && 'Date'[Date] ))

 

or


Till last month =
var _max = eomonth(today(),-1)
var _min = maxx(allselected('Date'), 'Date'[Date])
return
calculate(sum(Table[Value]), filter('date', 'Date'[Date] >=_min && 'Date'[Date] <=_max && 'Date'[Date] ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks! It worked!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.