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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
pbiOP1
Frequent Visitor

Filling a table that has sparse dates with newly generated dates between the existing ones

Hello there!

 

I am trying to periodify the income represented by funds awarded to an organization, to create a continuous variable, representing the amount made available (regardless of amount spent) at any given point in time. The goal of this is to use the "Forecast" function of PBI´s default line chart, and have it forecast future trends based on past funding data.

 

My data currently has a Signature Date column with sparse values, so there is no continuity between dates. I have created a dummy table showing this:

 

ContractCodeSignatureDateAmountGrant
Code101/01/201010
Code203/10/201020
Code310/12/201010
Code403/05/201330
Code504/06/201420
Code603/11/201470
Code705/02/201510
Code828/02/201520
Code929/10/201610
Code1029/10/201630
Code1121/09/201720
Code1201/06/201870
Code1301/01/201910
Code1403/10/201920
Code1510/12/201910

 

Because of this, PBI returns an error message when I try to use the prediction function: "Data are too irregular to create a forecast. Timescale is not uniform. Dates or numbers on a timescale must have coherent spaces between consecutive datapoints".

 

I take then I should create a table like the following one:

 

ContractCodeSignatureDateAmountEURCumulativeAmount
Code101/01/20101010
null02/01/2010null10
null03/01/2010null10
null04/01/2010null10
null05/01/2010null10
null06/01/2010null10
null07/01/2010null10
null08/01/2010null10
null09/01/2010null10
null10/01/2010null10
null11/01/2010null10
null12/01/2010null10
null13/01/2010null10
Code203/10/20102030
null04/10/2010null30
Code1510/12/201910360

 

I know how to create a Date Table (I already have one), but I have no clue on how to create a table such as the one I have dummied above, which fills the gap between two existing dates with the missing dates, leaving null values where there is no changes in the other variables but time does pass by.

 

My actual data consists on 4731 rows, with dates going back as far as 2009, so I don´t think doing this manually is an option.

 

Any help would be much appreciated (including any alternative solution to my problem that does not use the one I describe here).

 

Thanks in advance! 🙂

1 ACCEPTED SOLUTION
jtownsend21
Responsive Resident
Responsive Resident

@pbiOP1 I am not 100% or even 50% this will work, but I would try creating the following measure and using it as the value in your visual. 

SUM AmountGrant Test = 
CALCULATE(
    SUM(AmountGrant) + 0
) 

An alternate idea would be to create a column in your date table like the following: 

DATE Table Column Test = 
IF(
    SUM(AmountGrant) > 0, 
    SUM(AmountGrant), 
    0
)

I believe either of these should fill in the gaps between your dates with zeroes. However this still may not solve the issue as the values may still seem too eradic to the PBI forecast model. 

View solution in original post

2 REPLIES 2
tex628
Community Champion
Community Champion

Create a new seperate calendar table with dates ranging from 2009 and forward. Create a relationship between the dates in you table and the dates i the calendar and finally use the calendar dates in the visual instead.

Hope it works,
Johannes


Connect on LinkedIn
jtownsend21
Responsive Resident
Responsive Resident

@pbiOP1 I am not 100% or even 50% this will work, but I would try creating the following measure and using it as the value in your visual. 

SUM AmountGrant Test = 
CALCULATE(
    SUM(AmountGrant) + 0
) 

An alternate idea would be to create a column in your date table like the following: 

DATE Table Column Test = 
IF(
    SUM(AmountGrant) > 0, 
    SUM(AmountGrant), 
    0
)

I believe either of these should fill in the gaps between your dates with zeroes. However this still may not solve the issue as the values may still seem too eradic to the PBI forecast model. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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