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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DSwezey
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.

DSwezey_0-1637080700982.png

DSwezey_1-1637080707421.png

 

 

2 REPLIES 2
v-chenwuz-msft
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 =
CALCULATE(
    SUM( 'Monthly Sales'[Value] ),
    FILTER(
        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.

mattww
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

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.