The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
@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] ))
@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] ))
Thanks! It worked!