Hi all, I met a question when making a chart with my data. The data is packaged in the attached twbx file. The data simply describes the sales record. My purpose is to make a chart to show the distinct seller count of each item, only shows the top 3 item, all the other items are showed in one bar named “Others”, and the “Others” bar should always be the last bar. I use a SET to filter the top 3 items.
Now open my workbook and the default view chart looks like this:
Uncheck the sdate “2018/12/18” in the filter, then the chart becomes:
Check the sdate “2018/12/18” and the chart reverts to the original state.
Everything seems OK.
Now import the source data to a PostgesSQL or Greenplum database. Create a new data source via connect to the database, replace the data source, the chart becomes:
The second bar changed from P3 to P4. In fact, the measure value of P3/P4/P5 are the same (8), so here comes the first question: Why the sequences are different with different data source?
Now uncheck the sdate “2018/12/18” in the filter, then the chart becomes:
The “Others” bar is moved to the third place. This is not the correctly result we want. And logically this should not be the final result. Now refresh the data source, the chart is correct again:
So this is the second question: Why a refresh of data source (source data not changed) can cause a different chart?
I’ve tried to import the data to SQL server database and do the same test. The sequence of P3/P4/P5 is different from the former two cases (when use CSV data source, the sequence is P3-->P5-->P4, when use PostgesSQL/Greenplum data source, the sequence is P4-->P5-->P3, when use SQL server data source, the sequence is P3-->P4-->P5). Uncheck the sdate “2018/12/18” can get a correct result.
SetOrder.twbx 7.8 KB