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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Calculate YTD based on multiple columns and dynamic month

I would like to calculate running year to date total based on dynamic fiscal period and columns as per attached file

https://1drv.ms/x/s!AtC4vPlx9PrghywunoTDZiy1b0dy

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
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

6 REPLIES 6
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you.  I had to adjust my data and then your solution worked.

v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

Try the demo in the attachment. I hope you didn't share any sensitive data here.

1. Create a date table;

2. Establish a relationship;

3. Create a measure.

Measure =
TOTALYTD ( SUM ( Table1[Amount] ), 'Calendar'[Date] )

Calculate-YTD-based-on-multiple-columns-and-dynamic-month

 

Best Regards,
Dale

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

Hey experts,  many thank you.... ur sharing solved my 4 days work.

Anonymous
Not applicable

I need to be dynamic for example if there is a forecast version with data till the end of the year and actual version is only till October.  Then YTD amount for forecast should be until October for all projects.  I am basically looking for a column with YTD running total to be pulled into the report bcos these projects are later grouped differentlyy.

Hi @Anonymous,

 

How about this one? The calculated column may not be a good idea.

Measure 2 =
VAR maxDate =
    CALCULATE (
        MAX ( Table1[Fiscal year/period|Key Figures] ),
        FILTER ( ALL ( 'Table1' ), 'Table1'[VERSION] = "Actual" )
    )
RETURN
    TOTALYTD (
        SUM ( Table1[Amount] ),
        'Calendar'[Date],
        'Calendar'[Date] <= maxDate
    )

Calculate-YTD-based-on-multiple-columns-and-dynamic-month2

 

Best Regards,
Dale

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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