Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello,
I have a dataset where I am trying to find the average of a measure to show it as a card on my dashboard.
I have used the following measure code to get the time duration between two dates:
Solved! Go to Solution.
Hi, @analyst123
I create a sample table:
Then create a new measure and try the following DAX expression:
AverageDowntime =
DIVIDE(
SUMX(VALUES('Table'[Message number]), CALCULATE(
DATEDIFF(MIN('Table'[APPEARED]), MIN('Table'[DISAPPEARED]), MINUTE) +
(SECOND(MIN('Table'[DISAPPEARED])) - SECOND(MIN('Table'[APPEARED]))) / 60
)),
DISTINCTCOUNT('Table'[MESSAGE NUMBER])
)
Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @analyst123
I create a sample table:
Then create a new measure and try the following DAX expression:
AverageDowntime =
DIVIDE(
SUMX(VALUES('Table'[Message number]), CALCULATE(
DATEDIFF(MIN('Table'[APPEARED]), MIN('Table'[DISAPPEARED]), MINUTE) +
(SECOND(MIN('Table'[DISAPPEARED])) - SECOND(MIN('Table'[APPEARED]))) / 60
)),
DISTINCTCOUNT('Table'[MESSAGE NUMBER])
)
Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@analyst123 , Try below DAX
Proud to be a Super User! |
|
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
76 | |
52 | |
39 | |
35 |
User | Count |
---|---|
92 | |
67 | |
54 | |
52 | |
46 |