cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
RMtechm
Frequent Visitor

Calculate ageing zero for next line where we are using end date as current date which is previous li

Hi Team,

need your help to resolve one query, working on below sample data,

RMtechm_0-1693313838569.png

 

requirement is for same id we have multiple line items, where we dont have end date need to use current date & after that line item all remaining line items ageing should be "0" even if we have end date for next line its ageing should be "0" for same ID.

 

output should be like this in "Created-Closed Days" (in closed date i have highlighted in green where have used current date):

RMtechm_0-1693313512022.png

Thanks in advance.

2 REPLIES 2
JoeBarry
Solution Sage
Solution Sage

Hi @RMtechm 

 

You can create a new column for Closed

 

ClosedNew = If(Table[Closed] = BLANK(), Today(), Table[Closed])

 

For the Created/Closed Days

 

IF ([ClosedNew] <= TODAY(), DATEDIFF(Table[CaseCreated], [ClosedNew], DAY), 0)

 

JoeBarry_0-1693314554372.png



Thanks

Joe

 

If this post helps, then please Accept it as the solution

Hi Joe,

thanks for replay but it wont work as per requirement for current line item it is ok but what about next line item where i need "0" if we are using Closed date as Current date plz check out put table screenshot for your reference.

 

Note: you have taken same date for Created but my ask is same date for closed.

 

Thanks.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors