Forum Discussion
OsamaAbuAsal
2 years agoRegular Visitor
Date Between Issue, The Selected To Column will affect the Measure Only
Dears All, I Have 2 Fact Tables, One of them have consumed and Recieved Quantity and another one is Aggregated table that have the Avaliable Quantity, The Two facts have a DateID column and I have...
- Anonymous2 years ago
Hi OsamaAbuAsal ,
Maybe you can refer to below formula to create measure:
Measure_ConsumedQuantity = CALCULATE( SUM(Fact_ConsumedReceived[ConsumedQuantity]), FILTER( ALL(Dim_Date), Dim_Date[DateID] >= MIN(Dim_Date[DateID]) && Dim_Date[DateID] <= MAX(Dim_Date[DateID]) ) )Measure_ReceivedQuantity = CALCULATE( SUM(Fact_ConsumedReceived[ReceivedQuantity]), FILTER( ALL(Dim_Date), Dim_Date[DateID] >= MIN(Dim_Date[DateID]) && Dim_Date[DateID] <= MAX(Dim_Date[DateID]) ) )Measure_AvailableQuantity = CALCULATE( SUM(Fact_Available[AvailableQuantity]), FILTER( ALL(Dim_Date), Dim_Date[DateID] <= MAX(Dim_Date[DateID]) ) )Measure_TotalQuantity = [Measure_AvailableQuantity] + [Measure_ReceivedQuantity] - [Measure_ConsumedQuantity]Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi OsamaAbuAsal ,
Maybe you can refer to below formula to create measure:
Measure_ConsumedQuantity =
CALCULATE(
SUM(Fact_ConsumedReceived[ConsumedQuantity]),
FILTER(
ALL(Dim_Date),
Dim_Date[DateID] >= MIN(Dim_Date[DateID]) &&
Dim_Date[DateID] <= MAX(Dim_Date[DateID])
)
)Measure_ReceivedQuantity =
CALCULATE(
SUM(Fact_ConsumedReceived[ReceivedQuantity]),
FILTER(
ALL(Dim_Date),
Dim_Date[DateID] >= MIN(Dim_Date[DateID]) &&
Dim_Date[DateID] <= MAX(Dim_Date[DateID])
)
)Measure_AvailableQuantity =
CALCULATE(
SUM(Fact_Available[AvailableQuantity]),
FILTER(
ALL(Dim_Date),
Dim_Date[DateID] <= MAX(Dim_Date[DateID])
)
)Measure_TotalQuantity = [Measure_AvailableQuantity] + [Measure_ReceivedQuantity] - [Measure_ConsumedQuantity]
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.