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,
I am new to Power BI.
I want to create a new power BI Service report
I want to calculate when the Technician first attended the site and when did they finish his/her job. Also I want to add more calulcations based on this data like Number of Days to Finish the job, Avg Days to Finish the Job etc.
I used to create a Pivot table in excel and run some calculations in excel. Not sure if there is any DAX Formula in Power BI that can simplify this task.
| Call No. | Attended Date | Finished Date | Call Type | Centre | Eng. Status | Reqd Date | |||
| 57791 | 20-Mar-17 | 20-Mar-17 | WL | 1280 | F | 15-Jan-15 | |||
| 57791 | 23-Aug-17 | 23-Aug-17 | WL | 1980 | F | 15-Jan-15 | |||
| 92025 | 10-Mar-17 | 31-Mar-17 | WM | 1280 | F | 5-Jul-16 | |||
| 93500 | 20-Jan-17 | 20-Jan-17 | CC | 1380 | F | 20-Jan-17 | |||
| 94743 | 31-Jan-17 | 21-Feb-17 | LP | 1280 | F | 22-Aug-16 | |||
| 94743 | 21-Feb-17 | 21-Feb-17 | LP | 1280 | F | 22-Aug-16 | |||
| 97078 | 9-Jan-17 | 2-Feb-17 | CC | 1380 | F | 9-Jan-17 | |||
| 97078 | 10-Feb-17 | 10-Feb-17 | CC | 1380 | F | 9-Jan-17 | |||
| 97199 | 17-Jan-17 | 17-Jan-17 | CH | 1880 | F | 4-Oct-16 | |||
| 97284 | 21-Apr-17 | 21-Apr-17 | LP | 1780 | F | 5-Oct-16 | |||
| Expected Output | |||||||||
| Call No. | Attended Date | Finished Date | Call Type | Centre | Eng. Status | Reqd Date | Min of Attended Date | Max of Finished Date | # of Days |
| 57791 | 20-Mar-17 | 20-Mar-17 | WL | 1280 | F | 15-Jan-15 | 20-Mar-17 | 23-Aug-17 | 156 |
| 92025 | 10-Mar-17 | 31-Mar-17 | WM | 1280 | F | 5-Jul-16 | 10-Mar-17 | 31-Mar-17 | 21 |
| 93500 | 20-Jan-17 | 20-Jan-17 | CC | 1380 | F | 20-Jan-17 | 20-Jan-17 | 20-Jan-17 | 0 |
| 94743 | 31-Jan-17 | 21-Feb-17 | LP | 1280 | F | 22-Aug-16 | 31-Jan-17 | 21-Feb-17 | 21 |
| 97078 | 9-Jan-17 | 2-Feb-17 | CC | 1380 | F | 9-Jan-17 | 9-Jan-17 | 10-Feb-17 | 32 |
| 97199 | 17-Jan-17 | 17-Jan-17 | CH | 1880 | F | 4-Oct-16 | 17-Jan-17 | 17-Jan-17 | 0 |
| 97284 | 21-Apr-17 | 21-Apr-17 | LP | 1780 | F | 5-Oct-16 | 21-Apr-17 | 21-Apr-17 | 0 |
Thanks in advance.
Solved! Go to Solution.
Try like
Min Attended Date = min(Table[Attended Date])
Max Finished Date= Max(Table[Finished Date])
Days Diff = datediff([Min Attended Date],[Max Finished Date],Day)
Try like
Min Attended Date = min(Table[Attended Date])
Max Finished Date= Max(Table[Finished Date])
Days Diff = datediff([Min Attended Date],[Max Finished Date],Day)
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.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 31 | |
| 27 | |
| 24 |