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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

New Member

Custom Year To Date

Hello - 


I'm trying to create a custom Year to Date Calculation/Time Series.  

When I create the Custom Measures within Desktop it populates correctly. 


YTD = TOTALYTD(SUM(table[sales_amt]),Calendar[WK_END_DATE],"1/31")


But when I populate within Tabular Editor and change out the table/sales_amt with  "SelectedMeasure" I get errors/no results. 

any advice is appreciated.  Thank you. 


New Member

@amitchandak -


Thanks for you help. 

I've tried your way as well.  The Dax is accepted, but when I use the filter within the power bi tool it results in no data.


I'm able to hardcode the year with the result I'm expecting, but would like for it to be dynamic.


Super User
Super User

@atp_2006 ,


try like

calculate( Sum(Table[sales) ,datesytd(Calendar[Date],"1/31") ) // Make sue to use date of date Table


Create measures like

M1= Sum(Table[sales)



And create calculation group


calculate( selectedmeasures() ,datesytd(Calendar[Date],"1/31") )


Power BI — Year on Year with or Without Time Intelligence


Time Intelligence, Part of learn Power BI
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date:



Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display :


Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors