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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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