Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
QuantumLP
Frequent Visitor

Line chart showing higher values below lower values

I have a line chart which shows current year vs same period last year, but for some reason, when the value is higher than the current year, the line shows much below the actual value on the chart which is misleading.

 

Below is an example for the month of August, last year the value is higher, howver the line shows below the current year

 

any idea how to fix this?

 

QuantumLP_0-1661865015379.png

 

4 REPLIES 4
sdomingues
Frequent Visitor

Were you able to solve this? Happening the same thing here

vgferreira
New Member

The problem happens because for each line and different measurement, the maximum of the Y axis is different.
The solution I found was to create a measurement for the Y axis, in this measurement I look at which maximum value is the greatest between the two line measurements and choose it as a result to have the same value for both lines.

 

#Y_axis_MaxValue_Productivity_Evolution_Current_Year_Chart = 
var maxActual = CALCULATE(MAXX(f_kvi_summary_produtividade,[#produtividade/hr]))
var maxGoal = CALCULATE(MAXX(f_kvi_summary_produtividade,[#meta/hr]))
var calcMax = IF(maxActual > maxGoal, maxActual, maxGoal)

return calcMax

 



vgferreira_1-1698949474974.png

 

 




v-henryk-mstf
Community Support
Community Support

Hi @QuantumLP ,

 

Are you able to provide the formula that was created. In my contemporaneous comparisons, it seems to show up fine, here are the formulas I created.

this_year = sum(FactInternetSales[SalesAmount])
Previous_year =
CALCULATE ( [this_year], SAMEPERIODLASTYEAR ( M_DimDate[Date] ) )

vhenrykmstf_1-1662105644277.png

vhenrykmstf_2-1662105748023.png

 


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

My formulas are

 

Sales previous period = CALCULATE([TOTAL Completed Sales],SAMEPERIODLASTYEAR(DimDate[Date]))
TOTAL Completed Sales = SUM(ITAD_SP_Remarketing_Sales_Report[Completed_Sales])

 

Both formatted as currency, however as you can see in the screenshot below, the values do not show correctly in the line graph. 

 

I do have a filter on that visual to be this fiscal year

 

 

QuantumLP_1-1662123058611.png

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.