Forum Discussion

CH_MJR79's avatar
CH_MJR79
Helper II
2 years ago
Solved

Line chart will only display dots - no lines

I have added a Line Chart visual to my Power BI file, however whilst the dots are in the correct positions there is no line joining the dots up.   The X-Axis shows four years - 2020 to 2023 which a...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi   CH_MJR79 

    Please refer to the following solution.

    Sample data 

    2022

    2023

    The relationship

    Create a measure

     

    Measure = SWITCH(TRUE(),SELECTEDVALUE('Date'[Dates].[Year])=2022,SUM('2022'[Total]),SELECTEDVALUE('Date'[Dates].[Year])=2023,SUM('2023'[Total]))

     

    Then just input the date column and measure to the visual.

    Output

     

     

    Best Regards!

    Yolo Zhu

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