cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CJL8
Helper I
Helper I

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 IV
Super User IV

@CJL8 ,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-C...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

PaulDBrown
Super User II
Super User II

@CJL8 

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
Super User II
Super User II

@CJL8 

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

@PaulDBrown  Thanks for the help!

amitchandak
Super User IV
Super User IV

@CJL8 ,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-C...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

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

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.