Forum Discussion
Scatter plot doesn't match points rightly
Hi,
my issue regards scatter plots. I have a scatter plot with months on x-axis and some integer numbers on y-axis. If I filter the data so that some month has no number (it should be 0, but actually there's no data), the scatter plot doesn't show the 0-mark but goes straight from the former month to the latter.
For example, if I have the following data visualized in a scatter plot:
Jan 5
Feb 3
Mar 1
Apr 1
May 1
Jun 4
Jul 5
Aug 8
Sep 2
Oct 1
Nov 1
Dec 2
And then I use a filter so that I get no data for March and April, the plot goes from 3 for February to 1 for May without showing 0 for March and April.
It's senseless and I should fix it.
Please help me however you are able to.
Thank you very much
- Anonymous8 years ago
Anonymous,
Do you connect to SSAS database or SQL Server database in Power BI Desktop? If you connect to SQL Server using DirectQuery, you are able to use Query Editor in Power BI Desktop.
Also please open updated PBIX file.
Regards,
Lydia
19 Replies
- kohlivinayakResolver I
Hi Anonymous
Whatever calculations you are doing do it in a measure and add a 0 in the last eg
measure = sum(column_name) + 0
it will sove the problem.
Moreover I will personaly prefer a line chart with stroke width as zero and enable show markup to plot the points. With this i will be able to show names of the month
Thanks
Vinayak
- AnonymousNot applicable
Hi kohlivinayak and thank you for answering.
Unfortunately, it doesn't work. I created a measure adding 0 in the end but if I filter results the line still does not pass from 0 when it should.
Moreover I didn't understand what you mean with last sentence, starting with "moreover..."
Thanks
Nick
- kohlivinayakResolver I
Hi Anonymous
I guess you are not using any relation and is taking date from the same table.
I have created a powerbi file, in the table on right bottom i have created the same thing twice onw with date dimension and one without date dimension. Depending on your requirement use the case which suits you.
https://drive.google.com/open?id=1SZI6NaUmsjWVQKyYMztPYUliCaqbsDr3
I hope it helps.
Thanks
Vinayak