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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
LFORS
Frequent Visitor

Display previous incident date for each problem (DAX)

Hi all,

 

Im new to this forum but would love it if someone could help me with a DAX question?

 

What i am trying to achieve is display the date of the previous incident at a problem level. So in ITIL you can have multiple incidents with the same root cause and they are grouped at a problem level (Many:1). I have created an index in DAX that displays the sequence in which that incident occurs i.e first is 1 second is 2 etc and will reset for each problem.

 

Data:

Incident NumberDateProblemIndex
INC11/1/2022PRB A1
INC21/2/2022PRB A2
INC31/3/2022PRB A3
INC41/4/2022PRB B1
INC51/5/2022PRB B2
INC61/6/2022PRB B3
INC71/6/2022PRB C1
INC81/7/2022PRB D1

 

Expected Result:

Incident NumberDateProblemIndexPrevious Incident Date
INC11/1/2022PRB A1 
INC21/2/2022PRB A21/1/2022
INC31/3/2022PRB A31/2/2022
INC41/14/2022PRB B1 
INC51/15/2022PRB B21/14/2022
INC61/16/2022PRB B31/15/2022
INC71/16/2022PRB C1 
INC81/17/2022PRB D1 

 

I have found this post but doesnt work for what i need it to do. 

 

Any help would be greatly appreciated as i have been struggling with this for the past month. Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@LFORS , Create a new column

 

maxx(filter(Table, [problem] = earlier([problem]) && [date] < earlier([Date]) ) , [Date])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@LFORS , Create a new column

 

maxx(filter(Table, [problem] = earlier([problem]) && [date] < earlier([Date]) ) , [Date])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak Thanks so much. Worked Perfectly.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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