Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
Partner
Partner

Missing data points in scatter plot

Hello, i am creating an app to visualize the distribution of product prices and discounts they got using scatter plot. The problem is that when there are overlapping values, the points doesn't show up at all. On the picture are three products with price of 100$ as showed in the table (dummy dataset), but they do not appear in the scatter plot. Why? Am i missing sth?

This is Qlik Sense 2019 april version. I would appreciate some input from the community!

qs-missing-values.png

1 Solution

Accepted Solutions
ChiragPradhan
Contributor II

Re: Missing data points in scatter plot

Check the attached app.

7 Replies
ChiragPradhan
Contributor II

Re: Missing data points in scatter plot

Hi

I think you may be using Price as a dimension, in which case your data point for 100 would actually lie on 300 assuming you are using Sum as your aggregation function for measure.

Regards,

Chirag

Partner
Partner

Re: Missing data points in scatter plot

Yeah, price is my dimension and measure for the x-axis as well, without any aggregation though. Discount is my y-axis measure.

ChiragPradhan
Contributor II

Re: Missing data points in scatter plot

That is your problem. Since you are not using an aggregation function, where there are multiple values for a dimension value, it is returned as an array of values and treated as null by the chart. Essentially it equates to using the only function.

Where there is only one value per dimension value, it will show on the chart. 

Always use aggregation functions in your expressions !

Regards,

Chirag

Partner
Partner

Re: Missing data points in scatter plot

 

Thx for understanding the situation and providing insights about how it works behind the scenes.

However, what i want to achieve is to plot the multiple values anyway, so that the client can see and select them on the scatter plot. Other corresponding diagrams (e.g. the table below) should update accordingly. Is there a way to achieve that, maybe an appropriate aggregation?

Regards
Irving

ChiragPradhan
Contributor II

Re: Missing data points in scatter plot

Check the attached app.

Partner
Partner

Re: Missing data points in scatter plot

Hi Chirag, your solution certainly works. Please let me describe what happens in order to find out whether I understand the functionality correctly. In the dimension you extend the points with row numbers, which makes every one of them unique. For y-axis the sum of price is taken. For x-axis discount value is aggregated, i.e. grouped by price and discount, which are the both available axes. Do I have it all right?
ChiragPradhan
Contributor II

Re: Missing data points in scatter plot

Hi Irving, that's correct. The rowno caters for situations where the price and discount are same for a client or country. You could also use the PID but as a principle it's better to use numeric fields when aggregating. 

Please mark it as resolved, if it is what you are looking for.

Ta