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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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