Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone!
I posted yesterday a question and @CerebusBI could help me with a solution : https://community.powerbi.com/t5/DAX-Commands-and-Tips/Count-distinct-values-on-a-column-for-values-...
This measures from my questioins are part of a major measure to calculate MTBF (Mean Time Between Fails) with data i have.
So, another question...
I have to calculate a sum of diference between the Maximum date and Minimum date with each "Name of Product", excluding the Products who appears once time, so the example table is:
Name of Product | Open date fail |
Product 1 | 01/25/2021 |
Product 2 | 03/15/2021 |
| Product 2 | 03/20/2021 |
| Product 1 | 01/15/2021 |
| Product 3 | 04/02/2021 |
| Product 1 | 12/08/2021 |
| Product 1 | 10/13/2021 |
Being the maximum date locked, because i have to get always the last Thursday (refreshed automatically everyday when i publish repport):
MaxDate =
And the minimum date must be the MinDate of each Product, except the products that only appear once:
The measure i use until now:
| Name of Product | MinDate |
| Product 1 | 01/15/2021 |
| Product 2 | 03/15/2021 |
So, the Measure who i need results in:
Sum of (MaxDate - MinDate) excluding the Products who appears once time. (I must use a Card graphic and Table Graphic)
Can anyone help me with this?
Thank to the whole community, for everything!
Solved! Go to Solution.
Hi,
You can achieve this using DATEDIFF, SUMX and some filters.
e.g.
Data:
Dax:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Hi,
You can achieve this using DATEDIFF, SUMX and some filters.
e.g.
Data:
Dax:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 17 | |
| 14 | |
| 13 |