Forum Discussion
Need vertical line in bar graph
- 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)RETURNIF(PercentageChange >= 0.2, 1, 0) -- Assuming a 20% change is significantDid I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Hi yashwant101 Expecting the sample file from your end, because you know the data and expectations, share it with us,will check from our end.
Hi rajendraongole1 ,
I have not been allowed to share file yet but I can attach a screenshot:
Below is the expected graph:
In the above line and bar chart, we have a vertical dashed line for Oct-2023. That indictes that there was a significant change related to the orgnization in that month. I want to do this in Power BI for specific month.
- rajendraongole12 years ago
Super User
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)RETURNIF(PercentageChange >= 0.2, 1, 0) -- Assuming a 20% change is significantDid I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!