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.
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:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
119 | |
83 | |
47 | |
42 | |
34 |
User | Count |
---|---|
190 | |
79 | |
72 | |
49 | |
46 |