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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
shishir999
Helper II
Helper II

Data Trending based on dates

Hi,

 

I am trying to make a trend line chart, based on Start & Expired date. Below are the expected trend line and the data:

 

Scnario_PBI-01.jpgScnario_Data-01.JPG

 

In my scenario, need to read my Start date Amount as ZERO always for respective ProjID and Expire_Date as

the Amount value. Also, in case there is another entry for the same ProjID with modified Start\Expiry date, then it should

read that value either in the same Line or as another line trend.

 

Could someone please help in it.

 

Thanks

Shishir G.

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi Shishir,

 

Please download the demo in the attachment.

1. Create a date table. Don't establish any relationship.

2. Add an index since there could be more than one project ID.

3. Create a measure.

Measure =
IF (
    MIN ( 'Calendar'[Date] ) = MIN ( 'Table1'[Start_Date] ),
    0,
    IF (
        MIN ( 'Calendar'[Date] ) = MIN ( Table1[Expire_Date] ),
        SUM ( Table1[Amount] ),
        BLANK ()
    )
)

Data-Trending-based-on-dates

 

Best Regards,
Dale

Community Support Team _ Dale
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

1 REPLY 1
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi Shishir,

 

Please download the demo in the attachment.

1. Create a date table. Don't establish any relationship.

2. Add an index since there could be more than one project ID.

3. Create a measure.

Measure =
IF (
    MIN ( 'Calendar'[Date] ) = MIN ( 'Table1'[Start_Date] ),
    0,
    IF (
        MIN ( 'Calendar'[Date] ) = MIN ( Table1[Expire_Date] ),
        SUM ( Table1[Amount] ),
        BLANK ()
    )
)

Data-Trending-based-on-dates

 

Best Regards,
Dale

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.