Forum Discussion

calloni's avatar
calloni
Helper I
2 years ago
Solved

Line graph with 2 colors

Hello I have this table and I need to graph it as a line chart where I have a continuous line that will have 2 colors depending on the Line color column definitions:   Date Y axis Line color ...
  • Ritaf1983's avatar
    2 years ago

    Hi calloni 

    **"The "gap" in your data is created because the data is not continuous once you split it into 2 lines. The gray line ends before the orange line starts.

    If you want to get a graph like the one in the picture where the gray line is present until the orange line starts, you can artificially create it with 2 measures.

    Grey = sum('Table'[Y axis])
    orangeline_ = CALCULATE(sum('Table'[Y axis]),'Table'[Line color]="orange")

    The pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly