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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Budget YTD

Hello Team

 

I am trying to calculate a budget Year to Date but I am not able to get the right dax formula. Below is my budget table:

 

DateShopBudget_Sales
01/01/2023A900000
01/01/2023B800000
01/02/2023A1200000
01/02/2023B800000
01/03/2023A1300000
01/03/2023B1150000
01/04/2023A1400000
01/04/2023B1600000
01/05/2023A1500000
01/05/2023B1800000
01/06/2023A1700000
01/06/2023B1850000
01/07/2023A1700000
01/07/2023B1975000
01/08/2023A1600000
01/08/2023B1790000
01/09/2023A1500000
01/09/2023B1995000
01/10/2023A1800000
01/10/2023B2425000
01/11/2023A1600000
01/11/2023B2475000
01/12/2023A2500000
01/12/2023B3575000

 

Here is my calendar:

 

Calendar = ADDCOLUMNS ( CALENDAR ( Date ( 2021 , 10 , 01 ),  date ( 2025 , 12 , 31 ))
, "Month Year" ,  Format ( [Date] ,  "MMM-YYYY" )
, "Month Year sort" ,  Format ( [Date] ,  "YYYYMM" )
, "Year" ,  Year ( [Date] )
, "YYYY-WK" , CONCATENATE( FORMAT ( [Date] , "YYYY" ),Format(WEEKNUM([Date],2)-1,"00"))
, "Qtr Year" ,  Format ( [Date] , "YYYY\QQ" ))
 
Any idea on how I can calculate the YTD?
 
Thank you.
 
Kind Regards,
 
Hasvine
1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous ,

 

If you want to calculate the budget Year to Date, I suggest you to try below measure.

Measure = 
VAR _EndofCurrentMonth =
    EOMONTH ( TODAY (), 0 )
RETURN
    CALCULATE (
        SUM ( 'Table'[Budget_Sales] ),
        FILTER ( 'Calendar', 'Calendar'[Date] <= _EndofCurrentMonth )
    )

Result is as below.

vrzhoumsft_0-1680247438028.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous ,

 

If you want to calculate the budget Year to Date, I suggest you to try below measure.

Measure = 
VAR _EndofCurrentMonth =
    EOMONTH ( TODAY (), 0 )
RETURN
    CALCULATE (
        SUM ( 'Table'[Budget_Sales] ),
        FILTER ( 'Calendar', 'Calendar'[Date] <= _EndofCurrentMonth )
    )

Result is as below.

vrzhoumsft_0-1680247438028.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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