Forum Discussion
Anonymous
6 years agoNot applicable
SWITCH and ISFILTERED combination
Hi all I am using a measure as follows: Fixed cost var filters =
SWITCH(
TRUE(),
ISFILTERED(dDate[Year]),
DIVIDE(
CALCULATE(
SUM('Fixed Cost per Month'[fixed Co...
- Anonymous6 years ago
Using INSCOPE instead of ISFILTER does the job
Fixed cost var filters = SWITCH( TRUE(), ISINSCOPE(dDate[Year]), DIVIDE( CALCULATE( SUM('Fixed Cost per Month'[fixed Cost]), ALL('Fixed Cost per Month'[fixed Cost]) ) *MAX(dDate[Month Number]), [Dedicated Shipments] ), ISINSCOPE(dDate[Month]), DIVIDE( SUM('Fixed Cost per Month'[fixed Cost]), [Dedicated Shipments] ), ISINSCOPE('Prototype Modeling_Freight'[Plant Cluster]), DIVIDE( SUM('Fixed Cost per Month'[fixed Cost]), [Dedicated Shipments] ), ISINSCOPE('Equipment Master'[Max Loadability in Tonns]), DIVIDE(VALUES('Fixed Cost per Month'[fixed Cost]),[Dedicated Shipments]),BLANK() )
Anonymous
6 years agoNot applicable
Using INSCOPE instead of ISFILTER does the job
Fixed cost var filters =
SWITCH(
TRUE(),
ISINSCOPE(dDate[Year]),
DIVIDE(
CALCULATE(
SUM('Fixed Cost per Month'[fixed Cost]),
ALL('Fixed Cost per Month'[fixed Cost])
)
*MAX(dDate[Month Number]),
[Dedicated Shipments]
),
ISINSCOPE(dDate[Month]),
DIVIDE(
SUM('Fixed Cost per Month'[fixed Cost]),
[Dedicated Shipments]
),
ISINSCOPE('Prototype Modeling_Freight'[Plant Cluster]),
DIVIDE(
SUM('Fixed Cost per Month'[fixed Cost]),
[Dedicated Shipments]
),
ISINSCOPE('Equipment Master'[Max Loadability in Tonns]),
DIVIDE(VALUES('Fixed Cost per Month'[fixed Cost]),[Dedicated Shipments]),BLANK()
)