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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors