Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I am needing a calculation to get the average time in location between rows in groups. Below is the current data structure and desired output.
Data:
| JOB | LOCATION | TIME |
| 1 | a | 8/21/2021 |
| 1 | b | 8/22/2021 |
| 1 | c | 8/23/2021 |
| 1 | d | 8/24/2021 |
| 2 | a | 8/21/2021 |
| 2 | b | 8/22/2021 |
| 2 | c | 8/23/2021 |
| 2 | d | 8/24/2021 |
Output:
| Location | Average Time(Days) In location |
| a | |
| b | |
| c | |
| d |
Hi, @Tripb44
try to create a measure like this
_date =
DATE(1899,12,30)+AVERAGE('Table'[TIME])
result:
Please refer to the attachment below for details. Hope this helps.
If I did not understand your question correctly, please consdier sharing more details about it.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Tripb44 Maybe:
Measure =
VAR __Table = ADDCOLUMNS(SUMMARIZE('Data',[LOCATION],[JOB],"__Max",MAX('Data'[TIME]),"__Min",MIN('Data'[TIME])),"__Duration",([__Max] - [__Min]) *1.)
RETURN
AVERAGEX(__Table,[__Duration])
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 34 | |
| 32 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |