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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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