Forum Discussion
Ongoing Cost
Hi All,
We receive products on the Receival Date and sell them on the Sale Date. During this period, we pay rent for storage.
For example, if we receive a product in October 2022 and sell it in February 2023, and we select January 2023 in the dashboard, we should see that we paid rent for this product while it was sitting in storage. It should only show for January because that’s the month we are selecting.
At the moment, it’s completely dropping off because the Receival Date is not matching with the Date Table. if i build condition then it shows total value of entire period
Do you have any ideas on how I can execute this?
2 Replies
- Shravan133
Super User
Try this:
Monthly Storage Rent =
VAR SelectedMonthStart = MIN(DateTable[Date])
VAR SelectedMonthEnd = MAX(DateTable[Date])RETURN
CALCULATE(
SUM(YourData[RentCost]),
FILTER(
YourData,
YourData[Receival Date] <= SelectedMonthEnd &&
YourData[Sale Date] >= SelectedMonthStart
)
) - AnonymousNot applicable
Hi heygau ,
I think you can refer to Shravan133's reply and have a try.
If it still couldn't help you solve your issue, please share a sample file with us and show us with the result you want. This will make it easier for us to find the solution.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.