I have a table that has the following structure:
This table is linked to the calendar table through the column [Order Finished]. Now I would like to get every order - regardless the Order Finished Date with this filters:
Bow how? This approach is not working:
CALCULATE ( SUM ( tbl[Value]),
ALL ( Calendar),
tbl[Department] = "Drilling",
tbl[Area] = "FT1",
tbl[Status] > 16 && <> 20 && <=99 )
You can try this below code-
total_value =
CALCULATE (
SUM (tbl[Value]),
ALL (Calendar),
ALLEXCEPT(tbl,Department),
tbl[Department] = "Drilling",
tbl[Area] = "FT1",
tbl[Status] > 16,
tbl[Status] <> 20,
tbl[Status] <=99
)
If you need department wise different results, you should not have that department filter in the code as shown below-
total_value =
CALCULATE (
SUM (tbl[Value]),
ALL (Calendar),
FILTER(
ALLEXCEPT(tbl,Department),
&& tbl[Area] = "FT1",
&& tbl[Status] > 16,
&& tbl[Status] <> 20,
&& tbl[Status] <=99
)
)