Hi,
I like to Count of Machine that are active in a time periode. I have a start date, and stop date, and i use a calender table. Th Count of items can be for each day, week, month, year.
I have a shrepoint teble With “machines”, and a table With “Activity” With machine name, start and stop date.
Example: Start Stop
Machine A 1. january 31. march
Machine B 5. january 15. february
Machine C 20. february 28. march
Machine D 1. april 30. april
When i use pr week in the calendar tape, i lake to se how many machines that was active in this actual day, week og month. If the time of calculation is between the stop and start date, it should be counted.
Jan Feb March April
Machine A 1 1 1 0
Machine B 1 1 0 0
Machine C 0 1 1 0
Machine D 0 0 0 1
Any idea how the DAX formula should look like. Thank You :-).
How to resolve this will all depent on your model, so…
It’s important to provide as much context to a question as possible. This includes the data, the model, the formula, the filter context etc. And know that this forum is public. So if your data is considered sensitive - be sure to post a muck-up.
Since you have two dates to take into account, I can already suggest looking into this technique.
Here is the test DataModel. If we use context based on montly basis,
Machina A should be counted in for every date (day) between 1.january and 14. february;
Machine B should be counted in for every date between 1. january and 31.january,
Machine C should be counted in for every date between 15. february and 28. february AND 10 march and 31. march.
……
The intention is eg to se the time intervall between 4. january and 13. january. How many was active every day in that interval.