Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello Power Bi Experts,
I am new to Power Bi and I need your help and achieving a certain outcome.
Here is the sample data-
User Name | Activity Type | Datetime |
user1 | Data Accepted Successfully | 10-04-2021 15:20 |
user2 | Data Accepted Successfully | 09-04-2021 10:39 |
user3 | Data Accepted Successfully | 09-04-2021 09:40 |
user4 | Master Data Saved Succesfully! | 05-04-2021 18:03 |
user5 | Data Got Rejected | 24-03-2021 16:27 |
user6 | Data Accepted Successfully | 24-03-2021 10:09 |
user6 | Master Data Saved Succesfully! | 19-03-2021 19:14 |
I need the time taken for each activity type. For example, data accepted successfully at 24-03-2021 10:09 after it got saved at 19-03-2021 19:14, so i need to find (24-03-2021 10:09)-(19-03-2021 19:14).
Here is the desired output-
User Name | Activity Type | Datetime | Time Taken |
user1 | Data Accepted Successfully | 10-04-2021 15:20 | 1.1950463 |
user2 | Data Accepted Successfully | 09-04-2021 10:39 | 0.0404051 |
user3 | Data Accepted Successfully | 09-04-2021 09:40 | 3.6513426 |
user4 | Master Data Saved Succesfully! | 05-04-2021 18:03 | 12.0661 |
user5 | Data Got Rejected | 24-03-2021 16:27 | 0.2625347 |
user6 | Data Accepted Successfully | 24-03-2021 10:09 | 4.6217824 |
user6 | Master Data Saved Succesfully! | 19-03-2021 19:14 |
Thanks in advance!
@amitchandak @Jihwan_Kim @Gordonlilj @Greg_Deckler
Solved! Go to Solution.
@Anonymous , try a measure like
new measure =
var _max = maxx(filter(allselected(Table), [Datetime] < max([Datetime])),[Datetime])
return
datediff([datetime], _max, second)/(3600*24)
@Anonymous , Create a new column like
new column =
var _max = maxx(filter(Table, [Datetime] < earlier([Datetime])),[Datetime])
return
datediff([datetime], _max, second)/(3600*24)
@amitchandak Thank You for your response.
However, this solution doesn't give the desired result as the data is changing according to selection on matrix. Can we write any measure to get the output?
@Anonymous , try a measure like
new measure =
var _max = maxx(filter(allselected(Table), [Datetime] < max([Datetime])),[Datetime])
return
datediff([datetime], _max, second)/(3600*24)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |