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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Nihed
Helper III
Helper III

YTD in Power query

Hello,

 

Please how I can calculate YTD in power query ,what is the syntax please (urgent)

Thank you

1 ACCEPTED SOLUTION
ribisht17
Community Champion
Community Champion

@Nihed 

 

Please check this one https://powerusers.microsoft.com/t5/Power-Query/YTD-sum-of-columns-in-Power-Query-based-on-input-fro...

 

Thanks,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!

My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

View solution in original post

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Nihed ,

You can also refer the following links to get it by DAX:

Power BI Tips: Calculate Year-to-date Values

YTDSumOfSales = TOTALYTD([SumOfSales],’Calendar'[Date])

How to Create YTD Calculations in Power BI​

Sales YTD =
TOTALYTD(
    SUM(Orders[Sales]),
    Orders[Order_Date],
    ALL(Orders)
)

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ribisht17
Community Champion
Community Champion

@Nihed 

 

Please check this one https://powerusers.microsoft.com/t5/Power-Query/YTD-sum-of-columns-in-Power-Query-based-on-input-fro...

 

Thanks,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!

My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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