Forum Discussion

yashwant101's avatar
yashwant101
Icon for Helper III rankHelper III
2 years ago
Solved

Need vertical line in bar graph

Hi all,   I am showing a bar graph to the clients. The graph is a monthly chart with months on x-axis. I need a vertical dashed or dotted line after one specific month. I cnnot put any shape or ima...
  • rajendraongole1's avatar
    rajendraongole1
    2 years ago

    Hi yashwant101 - i have used with some sample data and in line chart you can use reference line and based on date create a measure and add conditional formatting.

     

     

    can you try the above logic

     

    SignificantChange1 =
    VAR CurrentMonthValue = SUM(financials[Profit])
    VAR PreviousMonthValue = CALCULATE(SUM(financials[Profit]), DATEADD(financials[Date], -1, MONTH))
    VAR PercentageChange =
        IF(
            NOT ISBLANK(PreviousMonthValue),
            DIVIDE(CurrentMonthValue - PreviousMonthValue, PreviousMonthValue, 0),
            0
        )
    RETURN
        IF(PercentageChange >= 0.2, 1, 0)  -- Assuming a 20% change is significant
     
     
    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!