Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
98 | |
80 | |
76 | |
66 |
User | Count |
---|---|
135 | |
109 | |
104 | |
83 | |
73 |