Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
i've a table in which i have karting with a start date rental and end date rental.
i'd like to measure the "stock" of rented karts or the available materials which is the opposite
For a given day, if it's between the two dates, the kart is rented, otherwise, not.
i tried a running total, but it sums the data
m_Total cumulé de Nombre de Lien Facturation::N° Contrat Comp dans Date =
CALCULATE(
COUNTA('Contrats Location'[Lien Facturation::N° Contrat Comp]),
FILTER(
ALLSELECTED('Date'[Date]),
ISONORAFTER('Date'[Date], MAX('Date'[Date]), DESC)
)
)
But i don't want a cumulative total, because when the rental is finished, then my kart is available.
My question is
Can measure that with dax
Or do i have to create a table with power Query that sums by day and the rented karts to display in a chart ?
thanks
i hope i'm clear.
Solved! Go to Solution.
Hello @amitchandak
Perfect, i manage to get the figure i was looking for thanks to the following formula !
Current Employees = CALCULATE(COUNTx(FILTER(Employee,Employee[Start Date]<=max('Date'[Date]) && (ISBLANK(Employee[End Date]) || Employee[End Date]>max('Date'[Date]))),(Employee[Employee Id ])),CROSSFILTER(Employee[Start Date],'Date'[Date],None))
Have a good day !
Hello @amitchandak
Perfect, i manage to get the figure i was looking for thanks to the following formula !
Current Employees = CALCULATE(COUNTx(FILTER(Employee,Employee[Start Date]<=max('Date'[Date]) && (ISBLANK(Employee[End Date]) || Employee[End Date]>max('Date'[Date]))),(Employee[Employee Id ])),CROSSFILTER(Employee[Start Date],'Date'[Date],None))
Have a good day !
@GeekAlfPro , based on what I got