Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
I want to count the number of days an object is in use. I want to count both the departure and return dates in the calcution. However, in some cases the object is returned on the same day it departs again.
I don't want to double count the days the object is in use in these situations. Is there a formula I'm able to use with DAX?
Below is a table with an example. I don't want to count March 15th twice
Departure Date | Return Date | Days in Use | Desired Result |
March 11 | March 12 | 2 | 2 |
March 13 | March 15 | 3 | 3 |
March 15 | March 18 | 4 | 3 |
Total | 9 | 8 |
Solved! Go to Solution.
Hi @Edgarb
You can solve this easily with Power BI Visual Calculations.
Here is the file with the solution: PBI_Problem_Solving/Count Number of Days in a Range of Days over Multiple Rows.pbix at main · pedror...
A few notes for this to work:
Reference: Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn
PBIX file here:
Hi @Edgarb
You can solve this easily with Power BI Visual Calculations.
Here is the file with the solution: PBI_Problem_Solving/Count Number of Days in a Range of Days over Multiple Rows.pbix at main · pedror...
A few notes for this to work:
Reference: Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn
PBIX file here:
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
107 | |
68 | |
48 | |
44 | |
43 |