Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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 FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
79 | |
63 | |
51 | |
30 |
User | Count |
---|---|
116 | |
114 | |
70 | |
66 | |
39 |