Forum Discussion
Filtering issue
- 1 year ago
Hi Rbakker888 -In such case,create a measure that explicitly calculates the filtered values for each table
Order Marge Bedrag Uren =
VAR OrderAmount =
CALCULATE(
SUM(fact_Orders[Order verkoop per periode]),
-- apply filter manually if needed, e.g. only for specific category or product
ALLSELECTED(fact_Orders) -- or use your dimensions here
)VAR LabourCost =
CALCULATE(
SUM(fact_Uren[ArbeidskostenTotaal]),
-- apply the same filter logic
ALLSELECTED(fact_Uren)
)RETURN
OrderAmount - LabourCostcheck the above and let us know.
This works just like my previous formula, it works fine until I add the filters. I found a little bit more info and that is that it works fine when I only filter on the order category but when I try adding the labour category's it suddenly sees the orders as 0 and just makes it all go negative.
Also the 2 columns you used in your formula are both measures but I assume that doesnt matter much?
Nevermind sorry, this did work after some tweaking of the formula, thank you for your assistance!
My final formula: