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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bourne2000
Helper V
Helper V

How to correct the axis into 0 to 100% in line graph?

Hi

 

I am having below data,

 

bourne2000_0-1631415465526.png

 

I would like to create a graph of date vs sales percentage in general and having Sales ID as a filter. However, when I tried to make that line graph, I am not able to get the axis correct. My sales (%)  column value in % and I would like to want the axis in 0 to 100%. Below is the output I am getting. I tried don't summrize option as well.

 

bourne2000_1-1631415555056.png

 

I am looking for a below ouput. I generated this in excel. 

 

bourne2000_2-1631415864663.png

 

Can anyone guide me how to do this?

 

My sampe pbix here https://we.tl/t-dB9JDyAg6B

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

@bourne2000 it looks like you have lots of % values for the same date for a single sales person. In order to plot these all on a line graph, you must convert them into a single value. How do you want to do this? MAX? AVERAGE? Don't summarize is not working because there is more than one value per date.

 

Also, just confirming you have a date table? https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html This will help ensure you have a 'continuous' axis - which is something you can set in the format options for the visual in Power BI.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @bourne2000 

 

Glad to see your problem solved. Is my answer above helpful?😀

Could you consider sharing your solution? It will help the others in the community find the solution easily if they face the same problem with you. Thank you. 

 

Best Regards,
Community Support Team _ Zeon Zheng

v-angzheng-msft
Community Support
Community Support

Hi, @bourne2000 

 

Since you have duplicate rows in your data, you can change the summary method to Average.

vangzhengmsft_2-1631592816707.png

 

And change the type of X-axis to "categorical"

vangzhengmsft_0-1631592758292.png

Then you can get the result

vangzhengmsft_3-1631592855815.png

Please refer to the attachment below for details. Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


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

 

AllisonKennedy
Super User
Super User

@bourne2000 it looks like you have lots of % values for the same date for a single sales person. In order to plot these all on a line graph, you must convert them into a single value. How do you want to do this? MAX? AVERAGE? Don't summarize is not working because there is more than one value per date.

 

Also, just confirming you have a date table? https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html This will help ensure you have a 'continuous' axis - which is something you can set in the format options for the visual in Power BI.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.