Forum Discussion
Anonymous
4 years agoNot applicable
Static line on line graph using a measure that changes depending on slicer values
Hi, Not sure what the best way for this would be but how would I add a static trend line to a line chart? I'm trying to get it to not show if nothing is selected on a single slicer, but then if...
- Anonymous4 years ago
Hi Anonymous ,
Try to add a What-if parameter first.
And then create a measure like this.
Trend line = CALCULATE(MAX('Table'[value1]),ALL('Table'))*SELECTEDVALUE(Parameter[Parameter])/100If you need 80% static lines, you slide the slicer to 80.
70% is as follows.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi Anonymous ,
Try to add a What-if parameter first.
And then create a measure like this.
Trend line = CALCULATE(MAX('Table'[value1]),ALL('Table'))*SELECTEDVALUE(Parameter[Parameter])/100
If you need 80% static lines, you slide the slicer to 80.
70% is as follows.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
thank you so much mate! that worked like a charm!
I managed to tweak slightly to change depending on what silcer is chosen:
National Screening Target = SWITCH(
SELECTEDVALUE('Cancer Screening'[Screening Type]),
"Cervical Cancer", .8,
"Bowel Cancer", .6,
"Breast Cancer", .7
)