Forum Discussion
Line chart Y axis scale is incorrect
I'm plotting a measure "Count last 8 weeks" on a line chart and the Y axis is incorrect. Manually adjusting it in the visual format settings is not helping.
Count Last 8 Weeks =
VAR Max_Week= MAX('CALENDAR'[Unique WeekNum])
VAR CaseCount= CALCULATE(COUNT('Reports WeeklyReporting'[evt_rin]), FILTER(ALL('CALENDAR'), 'CALENDAR'[Unique WeekNum]>=Max_Week-9 && 'CALENDAR'[Unique WeekNum]<=Max_Week-1))
RETURN CaseCount
amitchandak you helped me come up with the measure calculation in this post. Without "ALL" the chart is blank. With "ALL" the lines get plotted but the axis is incorrect. Can you clarify what's going on in the background based on your expertise? Perhaps Greg_Deckler can jump in too? Thanks.
Answering my own question here. Basically I did not even need to do any complicated measures for this one. All I needed was a WeekStartDate calculated column in my date table and then simply do a count of 'evt_rin' in field settings for the chart. This post really helped https://community.powerbi.com/t5/Desktop/how-to-change-calendar-week-start-date-from-Sun-to-Mon/m-p/922487
3 Replies
- v-henryk-mstfCommunity Support
Hi pborah ,
For line chart, you can modify the range and the displayed units (m, k) in Format->Y axis.For more details about line chart, check the following document link:
Customize X-axis and Y-axis properties - Power BI | Microsoft Docs
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.- pborahSolution Sage
v-henryk-mstf as I mentioned in my original post, manually adjusting my Y axis scale doesn't do anything to solve the problem. Please see the diagram once again where the top most line is at the max of Y axis at 8k.
I'm suspecting it's the measure that's causing something funky. If you want details of the post, please follow the hyperlinks embedded in the text of my post.
- pborahSolution Sage
Answering my own question here. Basically I did not even need to do any complicated measures for this one. All I needed was a WeekStartDate calculated column in my date table and then simply do a count of 'evt_rin' in field settings for the chart. This post really helped https://community.powerbi.com/t5/Desktop/how-to-change-calendar-week-start-date-from-Sun-to-Mon/m-p/922487