The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi community,
I have a table in my model like:
Year | Month | Data |
2024 | 1 | 1314 |
2024 | 2 | 1228 |
2024 | 3 | |
2024 | 4 | |
2024 | 5 | |
2024 | 6 | |
2024 | 7 | |
2024 | 8 | |
2024 | 9 | |
2024 | 10 | |
2024 | 11 | |
2024 | 12 |
I want my Line chart to paint all values in X Axis, but is painting only the months with values.
Is there an option to paint the rest of x axis (3 to 12) even if y axis is blank?
I change my X Axis to categorical, but no difference.
Thanks.
Solved! Go to Solution.
Hi @larx_mandel ,
Please right click on the month field and then check show items with no data.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @larx_mandel ,
You can change the type of the x-axis to Categorical, more information about this setting can be found in the documentation: Customize X-axis and Y-axis properties - Power BI | Microsoft Learn.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Line chart is not working like yours on my system.
Maybe Power bi desktop version is different? Or you have another configuration that I don´t? My Power BI version is 2.126.1261.0 64-bit (February 2024).
I modified your pbix file adding another line chart, but the behaviour of line chart is different from yours.
I cannot attach pbix on this question, but the graphics looks like:
Thanks.
Hi @larx_mandel ,
Please right click on the month field and then check show items with no data.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
It works with option 'Show items with no data'. You save my day. Thanks for ypur help.
Best regards.
Hello @larx_mandel ,
you can replace blanks with zero.
check this https://www.youtube.com/results?search_query=power+bi+replace+blank+with+zero
Proud to be a Super User! | |
Hi @Idrissshatila ,
I offered this option to user, but does not want to have 0. Line change unexpectedly, for example from 1228 to 0. Graphic is not 'nice'.
Is there another solution?
Thanks.
well you can't put another number or else it would be missleading. there's no other way, either its zero or blank.
you can't put a number that you don't have, or it will be fake data.
Proud to be a Super User! | |
User | Count |
---|---|
65 | |
62 | |
59 | |
53 | |
28 |
User | Count |
---|---|
181 | |
82 | |
67 | |
47 | |
44 |