Forum Discussion

nanacobsbs's avatar
nanacobsbs
Icon for Helper I rankHelper I
3 years ago
Solved

YTD calculation

Hi. I have a budget control graph as shown below. The bar graph is the actual YTD and the line graph is the budget YTD. The code is as follows. Actual YTD = CALCULATE('Budget Control'[Actual TTL]...
  • v-jianboli-msft's avatar
    3 years ago

    Hi nanacobsbs ,

     

    Based on your description, I have created a simple sample:

    Please try:

    First duplicat the calendar table for slicer:

    Then apply the measrue:

    Actual = IF(MAX('Calendar'[Date])<=MAX('For slicer'[Date]),SUM('Budget Control'[Actual TTL]))
    
    SUM of Budget = IF(MAX('Calendar'[Date])<=MAX('For slicer'[Date]),SUM('Budget Control'[Budget]))

    Final output:

    Best Regards,

    Jianbo Li

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