Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 Number | Date | Problem | Index |
| INC1 | 1/1/2022 | PRB A | 1 |
| INC2 | 1/2/2022 | PRB A | 2 |
| INC3 | 1/3/2022 | PRB A | 3 |
| INC4 | 1/4/2022 | PRB B | 1 |
| INC5 | 1/5/2022 | PRB B | 2 |
| INC6 | 1/6/2022 | PRB B | 3 |
| INC7 | 1/6/2022 | PRB C | 1 |
| INC8 | 1/7/2022 | PRB D | 1 |
Expected Result:
| Incident Number | Date | Problem | Index | Previous Incident Date |
| INC1 | 1/1/2022 | PRB A | 1 | |
| INC2 | 1/2/2022 | PRB A | 2 | 1/1/2022 |
| INC3 | 1/3/2022 | PRB A | 3 | 1/2/2022 |
| INC4 | 1/14/2022 | PRB B | 1 | |
| INC5 | 1/15/2022 | PRB B | 2 | 1/14/2022 |
| INC6 | 1/16/2022 | PRB B | 3 | 1/15/2022 |
| INC7 | 1/16/2022 | PRB C | 1 | |
| INC8 | 1/17/2022 | PRB D | 1 |
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
Solved! Go to Solution.
@LFORS , Create a new column
maxx(filter(Table, [problem] = earlier([problem]) && [date] < earlier([Date]) ) , [Date])
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |