Skip to main content
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.

Helper III
Helper III

Calculating Sales Goal Amount for days already passed in year

I have a "Sales Goal" table with "Sales Rep", "Attribute" (Month), and "Value"(Sales Goal Amount).


I have a measure to calculate the Sales Goal Amount by day for the selected month.

DailySalesGoalAMT = sum('Sales Goal'[Sales Goal Amount])/(DAY(EOMONTH('Date'MAX('Date'[Date]),0)))


I am currently trying to calculate the Actual Year-To-Date Sales Goal Amount. 

For example: if I have selected 5/10/2021 I want to see the total Sales Goal Amount for 1/1/2021 - 5/10/2021. 


I need to create a measure that will calculate the Sales Goal Amoutns for the days passed between the 1st day of the year and the current selected day. But keep in mind, each month has a different Sales Goal Amount.





Community Support
Community Support

Hi @DSwezey ,


You need create a table without relationships with these table above. Called Forslicer_table.

You can use some measures like following:

Total Sales =
    SUM( 'Monthly Sales'[Value] ),
        ALL( ForSlicer ),
        [Date] >= DATE( 2021, 1, 1 )
            && [Date] <= SELECTEDVALUE( 'Forslicer_table'[date] )


Best Regards

Community Support Team _ chenwu zhu


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

Responsive Resident
Responsive Resident

Hi @DSwezey 


So if I'm understanding you right, the reason you can't do a straightfoward YTD calculation is because your sales goals are recorded in months rather than day by day?


When I've done something similar to this in the past, I have joined my goals table onto a calendar (using the month name or month start date for the join) which then expands each month into one row per day. Your calendar table would also need a column for the number of days in the month, so you can then divide your Value column by that, essentially creating a column which is the goal for that day (i.e. any day in October for Nick is 52234 / 31)


Once you have this Goals by Day table, which is one row per person, per day, you can then do a Year to Date calculation on the new column.


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

Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Power BI Monthly Update - May 2024

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


Fabric certifications survey

Certification feedback opportunity for the community.