Forum Discussion
Anonymous
3 years agoNot applicable
Conditionally Format lines on a line graph
Hi, I would like to conditionally format my lines in the below line graph using year in DAX. The logic that I want is if year= 2019-2020, I would like the lines to be shown as dashed (--) instead of ...
- 3 years ago
Hi Anonymous ,
Maybe this is the result you want:
Please try following DAX:
Measure = CALCULATE(SUM('Table'[Values]),FILTER('Table','Table'[Year] IN {2019,2020}))Put the [measure] and [Value] into Y-axis:
Change line type of measure into dashed:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
3 years agoAnonymous , Create a measure for 2019-2020
example
calculate(Sum(’Data'[columnname]), Filter('Data','Data'[Year] in {2019,2022}))
use this measure in line visual, enable marked, and under shape choose marker shape _ and make line width 0