
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Count function give a wrong value
Hello everybody!
I used the count function to calculate the total number of order lines Count(Orderlines).
Please see column "Antal Inköpsorderrader" and it's grouped per YearMonth (Period)
This total (12) is wrong and you can see it in the next table which instead shows only 8 orderlines.
thanks a lot in advance for any kind of help


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As per my response in your previous posts, this is likely a duplication in your data structure. You'll need to check the different joins (or underlying queries) and find out what's causing it, and then get it fixed. Otherwise, every formula you write is going to need some sort of aggr() to work around the problem of an incorrect data structure.
Note that your table does not show there are only 8 lines, it shows there are eight *distinct* lines for that combination of dimensions only. Consider:
Load * INLINE [
Dim1, Dim2, Dim3, Dim4
Hello, World, Foo, Bar
Hello, World, Foo, Bar
Hello, World, Foo
This, Is, New, Line
];
With all four dimensions in a table, it will only contain three lines:
And with only the first three dimensions, the table will contain two lines:
Though of course in both cases, there are actually four lines in the data.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If there is no unique ID field within your data you may create one with recno() and rowno() within the relevant load(s) and then adding these fields to your table-box - now you will see which records are really within your table and from which origin record they come from.
- Marcus
