This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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)
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 23 | |
| 22 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 41 | |
| 27 | |
| 22 | |
| 20 |