We'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
Dear fellow PowerBi-ers,
I started PowerBI about a year ago and have learned a lot from this forum but now I am a bit stuck.
I want to calculate how long a product was in a certain status and I found a formula but its needs some tweaking.
The current formula (new column):
Duration (min) =
var Temp =
TOPN(
1,
Filter (
'ProductLogs',
'ProductLogs'[ProductID] = EARLIER('ProductLogs'[ProductID])
&& 'ProductLogs'[Timestamp] < EARLIER('ProductLogs'[Timestamp])
),
[Timestamp], DESC
)
Return
DATEDIFF(MINX(Temp,[Timestamp]),'ProductLogs'[Timestamp],MINUTE)
This returns the correct number but puts it in the wrong row.
On top of this, I want to include that whenever the product in its current/last status its calculates the difference with the current time.
Hope you can help. Thanks in advance
Solved! Go to Solution.
Few minutes after my post a similar question was posted and solved:
https://community.powerbi.com/t5/Desktop/Starting-date-and-End-Date-same-field-Diff-in-Dates/m-p/294...
Few minutes after my post a similar question was posted and solved:
https://community.powerbi.com/t5/Desktop/Starting-date-and-End-Date-same-field-Diff-in-Dates/m-p/294...
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 |
|---|---|
| 57 | |
| 38 | |
| 33 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 66 | |
| 40 | |
| 34 | |
| 25 |