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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Getting wrong project dates when generating table...

Hello PBI community:

 

I'm tracking revenue for projects over a few months; some projects generate revenue, and others stop (i.e., not cumulative total). 

 

I have a table that has one row for each project, but some projects span a few months. I need a row for each month each project spans. I have that down, but now I'm having an issue with the dates in the table I'm generating. I want the first row for a project to have a date that matches the start date of the project (and the second row to be the first date of the month for the next month the project generates revenue, and so on for subsequent months--to be clear, once we start work on a project, we continuosly work on it until it is completed).

 

Here is a table that shows each project with start & stop dates:

Project #Duration (Months) Expected MonthlyEst Start DateEst End Date
1001 $   12,000.00$12,000.001/1/20191/31/2019
2003 $   10,000.00$3,333.332/1/20194/30/2019
3002 $     3,000.00$1,500.001/1/20192/28/2019
4004 $     8,000.00$2,000.003/1/20196/30/2019
5002 $     2,000.00$1,000.002/1/20193/31/2019

 

The image below shows the first date for project 200, and it is incorrect.

 

PBI screenshot.jpg

 

 

I'm posting links to my data here:

 

My pbi file

My excel sheet (used as source for pbi file)

 

Any help is appreciated.

1 ACCEPTED SOLUTION

Hi @Anonymous

 

Please check if below table matches your request.

Table = 
FILTER (
    GENERATE (
        SELECTCOLUMNS ( 'My Date Table', "My Date", 'My Date Table'[Date] ),
        Projects
    ),
    Projects[Est Start Date] <= [My Date]
        && Projects[Est End Date] >= [My Date]
        && DAY ( [My Date] ) = 1
)

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

For those who are curious, the 'temporary' table returns a number labeled [Value]. It seems to correspond to the month number. The fix is changing the expression associated with the 'Month' column in the table generated by SELECTCOLUMNS. I set the expression to this:

 

"Month", DATE(YEAR([Est Start Date]),[Value],1),
 
That gave me the appropriate date value for my rows. 
 
**You have to use [value] in the calculation as that is how the dates differ from line to line.**
 
If you don't use [Value], the table will apply the same date under the month column to each row. [Value] is the key to giving each row for a project (that spans more than 1 month) a different date.

Hi @Anonymous

 

Please check if below table matches your request.

Table = 
FILTER (
    GENERATE (
        SELECTCOLUMNS ( 'My Date Table', "My Date", 'My Date Table'[Date] ),
        Projects
    ),
    Projects[Est Start Date] <= [My Date]
        && Projects[Est End Date] >= [My Date]
        && DAY ( [My Date] ) = 1
)

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hey @v-cherch-msft

 

Thanks for taking the time to reply. Your solution works. I'm posting both PBIX files--one with my solution & one with yours so people can see both. 

 

ADDCOLUMNS / GENERATE / SELECTCOLUMNS solution

FILTER / GENERATE / SELECTCOLUMNS solution

 

Thanks so much.

 

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.

Top Kudoed Authors