Forum Discussion

AspiringAnalyst's avatar
AspiringAnalyst
Frequent Visitor
2 years ago
Solved

Calculate task forecasts with time intelligence based on summing a value

Hello all,

 

My business case is that I have a nursery.  I'm recording GDUs (growing degree units) each day and have a calculated column set up that if I populate my known GDU accumulated by day it uses that value (good for past dates and today).  I forecast avg historical GDU into the calculation for future dates, and I have the planting dates for my crops.  How can I predict the task date based off of summing the GDUs until the known GDU requirement has been met?

Here is my planting list table of required GDU for task and the date it was planted:

 

'checklist'

VarietyGDU requiredPlanting Date
Bell Pepper A14014/15/2024
Bell Pepper B13604/21/2024
Bell Pepper C13604/30/2024
Bell Pepper D13145/3/2024
Bell Pepper E13535/5/2024
Bell Pepper F12905/8/2024
Cantelope A10004/25/2024
Cantelope B10604/30/2024
Watermelon A14504/15/2024
Watermelon B14004/21/2024
Watermelon C14254/30/2024
Tomato A13374/30/2024
Tomato B13245/3/2024
Tomato C13125/5/2024
Tomato D13535/8/2024
Spinach A6505/3/2024
Spinach B7005/5/2024
Spinach C6305/8/2024

 

Here is my GDU table (I know it's long), where each day I input actual GDU, and future dates are the avg/day historically:

'GDU tracking'[CalculatedGDUs] being the column of interest

DateLowHighGDUCalculatedGDUs
5/1/2024527111.511.5
5/2/202454661010
5/3/2024427311.511.5
5/4/2024486899
5/5/202440699.59.5
5/6/202454761515
5/7/202457771717
5/8/2024528116.516.5
5/9/202454659.59.5
5/10/202451731212
5/11/202446781414
5/12/202449861818
5/13/202461731717
5/14/2024  015
5/15/2024  015
5/16/2024  015
5/17/2024  015
5/18/2024  015
5/19/2024  015
5/20/2024  015
5/21/2024  015
5/22/2024  015
5/23/2024  015
5/24/2024  015
5/25/2024  015
5/26/2024  015
5/27/2024  015
5/28/2024  015
5/29/2024  015
5/30/2024  015
5/31/2024  015
6/1/2024  021
6/2/2024  021
6/3/2024  021
6/4/2024  021
6/5/2024  021
6/6/2024  021
6/7/2024  021
6/8/2024  021
6/9/2024  021
6/10/2024  021
6/11/2024  021
6/12/2024  021
6/13/2024  021
6/14/2024  021
6/15/2024  021
6/16/2024  021
6/17/2024  021
6/18/2024  021
6/19/2024  021
6/20/2024  021
6/21/2024  021
6/22/2024  021
6/23/2024  021
6/24/2024  021
6/25/2024  021
6/26/2024  021
6/27/2024  021
6/28/2024  021
6/29/2024  021
6/30/2024  021
7/1/2024  023
7/2/2024  023
7/3/2024  023
7/4/2024  023
7/5/2024  023
7/6/2024  023
7/7/2024  023
7/8/2024  023
7/9/2024  023
7/10/2024  023
7/11/2024  023
7/12/2024  023
7/13/2024  023
7/14/2024  023
7/15/2024  023
7/16/2024  023
7/17/2024  023
7/18/2024  023
7/19/2024  023
7/20/2024  023
7/21/2024  023
7/22/2024  023
7/23/2024  023
7/24/2024  023
7/25/2024  023
7/26/2024  023
7/27/2024  023
7/28/2024  023
7/29/2024  023
7/30/2024  023
7/31/2024  0

 

I'd like to forecast, based off of the planting date, adding GDUs in the 'GDU tracking'[CalculatedGDUs] column, the date on which I can expect my crop to flower, hit a milestone, etc.  

This would be a calculated column in my 'checklist' table named [ForecastedDate].  Ideally, I'm able to change the value of 'GDU required' in different columns based off of different task needs to generate a to-do list of tasks by date for each crop variety.

 

Where do I start with this?  I feel like I'm using VAR and the GDU required column in a CALCULATE function, though I'm not sure the right approach.

 

  • lbendlin's avatar
    lbendlin
    2 years ago

    Please provide sample data that fully covers your issue.
    Please show the expected outcome based on the sample data you provided.

  • lbendlin's avatar
    lbendlin
    2 years ago

    Here's the Ready Date as a calculated column in the checklist table

     

    Ready Dt = 
    var a = filter('GDU tracking',[Date]>=[Planting Date])
    var b = ADDCOLUMNS(a,"c",var d = [Date] return sumx(filter(a,[Date]<=d),[CalculatedGDUs]))
    var c = filter(b,[c]<=[GDU required])
    return maxx(topn(1,c,[Date],DESC),[Date])

10 Replies

    • AspiringAnalyst's avatar
      AspiringAnalyst
      Frequent Visitor

      Wow thank you!

      I've transferred the measures into my working model and I see that in instances of varieties not yet populated with a planting date, it is summing from the beginning of the CalculatedGDUs column.  What is the best way to not assign Ready Dates to those items?  Would it be in the DAX expression itself or through a Filter on the page/visuals removing null values for planting date?

      • lbendlin's avatar
        lbendlin
        Super User

        Please provide sample data that fully covers your issue.
        Please show the expected outcome based on the sample data you provided.

    • AspiringAnalyst's avatar
      AspiringAnalyst
      Frequent Visitor

      Is it possible to set the measure of ready date to the x axis of a bar chart?  I am now looking to aggregate a count of things ready by date via a chart over a table.