Forum Discussion
Anonymous
6 years agoNot applicable
switch depending on the slicer selection
Hi all, I have two measure: [CompanyTarget] [SiteTarget] And one slicer: "Sellect All" / "Site 1" / "Site2" /... / "Site8" I would like to swich from [CompanyTarget] to [SiteTarget], dependi...
- Anonymous6 years ago
Hi Anonymous ,
I fixed my formula and your measures, then it can work with both single and multiple selections:
Site Target = SELECTEDVALUE ( Targets[Water], SUM ( Targets[Water] ) ) Company Target = CALCULATE ( SUM ( Targets[Water] ), FILTER ( ALL ( Targets ), Targets[Site Code] = 99 ) ) Measure = SWITCH ( ISFILTERED( Tabla[Site Name] ), TRUE (), [Site Target], FALSE (), [Company Target] )Regards,
Xiaoxin Sheng
Anonymous
6 years agoNot applicable
Hi Anonymous ,
I fixed my formula and your measures, then it can work with both single and multiple selections:
Site Target =
SELECTEDVALUE ( Targets[Water], SUM ( Targets[Water] ) )
Company Target =
CALCULATE (
SUM ( Targets[Water] ),
FILTER ( ALL ( Targets ), Targets[Site Code] = 99 )
)
Measure =
SWITCH (
ISFILTERED( Tabla[Site Name] ),
TRUE (), [Site Target],
FALSE (), [Company Target]
)
Regards,
Xiaoxin Sheng
Anonymous
6 years agoNot applicable
Great solution Anonymous thank you very much!