Forum Discussion

Victor_AguirreV's avatar
Victor_AguirreV
Regular Visitor
2 years ago
Solved

Calculate with/without Filter() function and

Hey guys,   So apparently I have been missing something very crucial about how the calculate function works. I am currently on the Datacamp course to get certified, and the question is asking to cr...
  • Ashish_Mathur's avatar
    2 years ago

    Hi,

    It looks like you are trying to calculate a running total by date.  Here's the approach i would use:

    1. Create a Calendar Table and a relationship (Many to One and Single) from the Recorded Date column to the Date column of the Calendar Table
    2. To your visual, drag Date from the Calendar Table
    3. Write this measure

    RT = calculate(sum(Expenditures[Budgeted amout]),datesytd(Calendar[Date],"31/12"))

    The RT will resent on Jan 1 of each year.