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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jnpb
Helper I
Helper I

Granularity of trend lines for line chart - I'm stuck!

Hi all, 

I have a line chart with two trend lines (CY and PY). These are showing correctly on my chart, but in order to do so I find that I require to use both the MonthName and WeekOfMonth fields from my date table in order to get granular enough uptick points on my lines. 
The problem with this is that the WeekOfMonth field being added to the X axis adds week numbers 1 through 5 to the X axis labels and doesn't make proper sense (given that Week 5 of a month usually overlaps with Week 1 of the following month). 

Here's what it looks like with both the MonthName and WeekOfMonth with proper incremental climb of the trend line for CY (Shown in pink for CY): 

Screenshot 2024-01-14 181730.png

 

Note the week numbers at the bottom above the MonthName. In a perfect world, if these numbers were not visible on the label at all but the granularity of the line was retained, that would solve my problem. 

Here's what it looks like if I use just the MonthName: 

Screenshot 2024-01-14 181757.png

The data values are still correct, but in this format the line for CY will only presumably update - and very sharply - once February starts. This is not ideal/desired. 

Note that the goal is to compare CY and PY over January to December, and so using the Date field in the X axis does not have the correct effect either. It needs to remain as January-December on the X axis labeling. 

I don't know what else to do to solve for this - any advice on how to accomplish this would be immensely appreciated. Thanks!



3 REPLIES 3
v-binbinyu-msft
Community Support
Community Support

Hi @jnpb ,

In order to better understand your demands and give the right solution, could you please provide some more specific information? such as your desensitized example data and a screenshot of your desired results?

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi there, 

I'm wondering if you've had a chance to look at the pbix file I provided and the accompanying details - I'm blocked from completing this project until i can figure this out. It is frustrating that this is made so difficult! 😞 

 

 

Absolutely - here is the link to the desensitized .pbix containing the line chart:  
https://file.io/255lokewSpSb 

 

And here's a screenshot of what I'm meaning:

 

Screenshot 2024-01-16 062556.png

 

Notes: 
The week numbers on the X axis: I used a red strikethrough for these to note that they shouldn't be appearing. They are generated using the WeekOfMonth field in the X axis (along with the MonthName field). This field is the only way I can find to get the trend lines to uptick incrementally throughout the month, instead of just one big uptick once a month. 

- PY (blue line) should go all the way across from Jan to Dec as shown here. 
- CY (pink line) should start in January and end at the current week, as shown here. 

Here is the same line chart for 2022-2023 created in Excel by someone no longer with the company. Note the granular uptick of the trend lines - i'm hoping to get as close to that as possible and avoid the sharp, once-a-month increases: 


Screenshot 2024-01-16 063557.png

 

I left my date table and the non-sensitive data table in the report for analysis. I'm hoping what I'm trying to solve for makes sense. Any insight you could provide is enormously appreciated. 

Thank you!

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.