Looking at the raw data, the rows for each food ID are repeated several times. Most of those values are 0 for Calories and the corresponding Proteins for the same food id are on a different row. The visualization you created does not aggregate the total per food ID. It currently shows every row in the data so the pairs of values are Calories with a zero Protein and Proteins with zero calorie. This is what creates the L shape.
First - aggregate your data by selecting "Aggregate measures" from the Anaysis menu.
Second, the level of aggregation needs to be understood so place the Food ID value and I suggest the Food Description field on the Marks shelf. With this we can see the values for every food in your data set on the scatterplot.
as for your field - try changing the fields to use aggregation - (IF sum([Protein])>0 THEN 100 ELSE sum([Protein]) END) / (IF sum([Calories])>0 THEN 1000 ELSE sum([Calories]) END)
Hi Patrick, thanks for your response!
I implemented your suggestions
- "Aggregate measures" is already checked under the Analysis menu.
- I changed my "Protein per Calorie" calculated field to an aggregation.
But the chart is still an L shape.
How would you describe the problem I'm having? I've been trying to search this question on Youtube and the forums but I can't find anything that pertains to my situation.