Forum Discussion
Change horizontal/constant line based on slicer selection
- 7 years ago
Hi NoaB ,
You need to add a measure that makes the calculation for each of your option on the slicer, something like this:
Flat Line = SWITCH ( SELECTEDVALUE ( Table2[Capacity] ); "A"; 20; "B"; 25; "C"; 5; "D"; 40; 80 )This needs to be adjusted to your needs but as you can see below the numbers change accordingly
Regards,
MFelix
Hi NoaB ,
You need to add a measure that makes the calculation for each of your option on the slicer, something like this:
Flat Line =
SWITCH (
SELECTEDVALUE ( Table2[Capacity] );
"A"; 20;
"B"; 25;
"C"; 5;
"D"; 40;
80
)
This needs to be adjusted to your needs but as you can see below the numbers change accordingly
Regards,
MFelix
- NoaB7 years agoFrequent Visitor
Hi MFelix ! Thanks for your response!
I tried your approach and I'm still having some issues. Is Table2[Capacity] the table that has a column "Capacity" which results in the options for the slicer?
I attempted thios measure below and was receiving an error "Unexpected expression" for everything starting after the semicolon after "SELECTEDVALUE( HourlyCapacityWithETA[PoolName] );"
Flat Line =SWITCH(SELECTEDVALUE( HourlyCapacityWithETA[PoolName] );"Var1"; 220;"Var2"; 220;"Var3"; 70;"Var4"; 364;)Thanks for your help!