Forum Discussion
rcardenasbc
2 years agoFrequent Visitor
Line graph with solid and dotted lines
Hello, I need a lot of help, I want to make a line graph where the x axis are the months of the year and the y axis are 3 values, but I don't know how to make the lines appear dotted starting from th...
- 2 years ago
You can use 2 measures for this. I have taken your sample data and made the below:
My two measures are as follows, starting with Previous Months:
VAR month_now = MONTH ( NOW () ) VAR calc = CALCULATE ( SUM ( 'Table'[Data 1] ), KEEPFILTERS ( 'Table'[Month Number] < 5 ) ) RETURN calcThe next one does current and future months:
VAR month_now = MONTH ( NOW () ) VAR calc = CALCULATE ( SUM ( 'Table'[Data 1] ), KEEPFILTERS ( 'Table'[Month Number] >= month_now ) ) RETURN calcOnce you have put the two measures in the Y-Axis of the chart, you can set the Line settings for the Current Month Line differently:
If this works, please mark this as the solution.
mark_endicott
Super User
2 years agoYou can use 2 measures for this. I have taken your sample data and made the below:
My two measures are as follows, starting with Previous Months:
VAR month_now =
MONTH ( NOW () )
VAR calc =
CALCULATE ( SUM ( 'Table'[Data 1] ), KEEPFILTERS ( 'Table'[Month Number] < 5 ) )
RETURN
calcThe next one does current and future months:
VAR month_now =
MONTH ( NOW () )
VAR calc =
CALCULATE (
SUM ( 'Table'[Data 1] ),
KEEPFILTERS ( 'Table'[Month Number] >= month_now )
)
RETURN
calcOnce you have put the two measures in the Y-Axis of the chart, you can set the Line settings for the Current Month Line differently:
If this works, please mark this as the solution.