Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
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:
User | Count |
---|---|
90 | |
88 | |
86 | |
79 | |
49 |
User | Count |
---|---|
153 | |
145 | |
106 | |
74 | |
55 |