Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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:
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
56 | |
38 | |
34 |
User | Count |
---|---|
99 | |
56 | |
51 | |
44 | |
40 |