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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Daily Sales Target

Hi all!

 

I'm a new user in Power BI and have what I believe is a fairly easy-solved question. I'm trying to display a daily sales target for the rest of the year based on YTD sales and the set yearly target.

 

I have so for created a measure displaying the remaing yearly sales figure, in order for the team to reach the yearly target. I would now like to create a measure which divides the remaining yearly target by the remaing days, providing an updated figure of how much the team on average needs sell per day in order to reach the yearly goal.

 

My dates table consists of the working days, 5 days per week. I have tried to create a measure for the remaining dates of the year based on this dates table but have failed to to that. 

 

Any help to my problem would be very welcome, thanks!

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Also, refer if this blog can help you a bit

Distributing/Allocating the Yearly Target(Convert to Daily Target): Measure ( Daily/YTD): Magic of CLOSINGBALANCEYEAR With TOTALYTD/DATESYTD: https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Yearly-Target-Convert-to/ba-p/1476400

View solution in original post

PaulDBrown
Community Champion
Community Champion

@Anonymous 

To calculate the working days remaining until the end of year, you can try:

1) Include a column in your calendar table to identify working days (in my case working days exclude Saturdays and Sundays, but adjust according to your setting):

Working days.JPG

2) Create a simple SUM measure for working days: 

 

Sum Working days = SUM('Calendar Table'[Working Days])

 

 

3) Calculate the working days remaining until the end of the current year:

 

Remaining Working Days Measure = 
VAR _EndOfYear = DATE(YEAR(TODAY()), 12, 31)

RETURN
CALCULATE([Sum Working days], 
        REMOVEFILTERS(), 
            FILTER(ALL('Calendar Table'[Date]), 
                'Calendar Table'[Date] > TODAY() 
                    && 'Calendar Table'[Date] <=_EndOfYear))

 

 

Now you can divide the remaing sales target by the remaining working days

 

PS If you wish to calculate the remaining working days (Monday - Firday) using only a measure (without including a column in the Calendar Table), you can use:

Measure Remaing Working Days = 
VAR EOYEAR = DATE(YEAR(TODAY()), 12, 31)
RETURN
COUNTROWS(
    FILTER(ALL('Calendar Table'[Date]), 
        'Calendar Table'[Date] > TODAY()
            && 'Calendar Table'[Date] <= EOYEAR
                && WEEKDAY('Calendar Table'[Date], 2) IN {1,2,3,4,5}))

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

4 REPLIES 4
PaulDBrown
Community Champion
Community Champion

@Anonymous 

To calculate the working days remaining until the end of year, you can try:

1) Include a column in your calendar table to identify working days (in my case working days exclude Saturdays and Sundays, but adjust according to your setting):

Working days.JPG

2) Create a simple SUM measure for working days: 

 

Sum Working days = SUM('Calendar Table'[Working Days])

 

 

3) Calculate the working days remaining until the end of the current year:

 

Remaining Working Days Measure = 
VAR _EndOfYear = DATE(YEAR(TODAY()), 12, 31)

RETURN
CALCULATE([Sum Working days], 
        REMOVEFILTERS(), 
            FILTER(ALL('Calendar Table'[Date]), 
                'Calendar Table'[Date] > TODAY() 
                    && 'Calendar Table'[Date] <=_EndOfYear))

 

 

Now you can divide the remaing sales target by the remaining working days

 

PS If you wish to calculate the remaining working days (Monday - Firday) using only a measure (without including a column in the Calendar Table), you can use:

Measure Remaing Working Days = 
VAR EOYEAR = DATE(YEAR(TODAY()), 12, 31)
RETURN
COUNTROWS(
    FILTER(ALL('Calendar Table'[Date]), 
        'Calendar Table'[Date] > TODAY()
            && 'Calendar Table'[Date] <= EOYEAR
                && WEEKDAY('Calendar Table'[Date], 2) IN {1,2,3,4,5}))

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

@PaulDBrown  Thanks for the help!

amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Also, refer if this blog can help you a bit

Distributing/Allocating the Yearly Target(Convert to Daily Target): Measure ( Daily/YTD): Magic of CLOSINGBALANCEYEAR With TOTALYTD/DATESYTD: https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Yearly-Target-Convert-to/ba-p/1476400

Anonymous
Not applicable

Thanks @amitchandak! Checked out the blog which helped me a lot

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.