Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Hannah,
To begin with your definition, 'to show how many tests were done on a test type'. This shows you the number of unique tests, not how many tests on a test type, right?
But what is the real problem, could you show an image with the wrong calculated values? Or could you maybe make a table containing the data? This makes helping you a bit easier.
Jordy
Climber
Hey,
I just noticed that I have similar Problems in other counting diagrams. It seems liked Qlik Sense isn't able to get the complete data or just isn'T able to count right.
Here is a example. because I can't share the real data:
Order Number Test typ result component
1 Berstkraft 5 KK
1 Berstkraft 12 KK
2 Rotation 7 Ins
2 Rotation 6 Ins
2 Rotation 10 Ins
3 Berstkraft 2 Ins
3 Berstkraft 4 Ins
In this case 66% (or 2 orders) of Berstkraft and 33% (or 1 order) of Rotation would have to be displayed. Since one row per result is stored in the table, I use distinct.
In my example, with the component selection 'KK' 100 percent Berstkraft would have to be displayed. Instead, 50% Berstkraft and 50% Rotation are displayed. He also shows only one order per trial type. Even if it is much more orders than here in the example.
Thanks
Hannah
In an older version of my app there is the same diagram with the same diagram script. Seems like it doesn't count right but it doesn't show equal parts. So probably it never worked right but something changed. Something that isn't in the diagram script. It has old data as well. Data loaded in May. So maybe there is bad data in the database now?
Hi Hannah,
You need to use the following formula:
Count(Distinct [Order Number])
This will result in, with test typ as dimension, in a 66,6% to a 33,3% mix.
The other one it not doing that because it is counting the unique test types and you only have two in your test set.
Jordy
Climber
Thanks,
but beside the bracktets it's the same like Count (distinct AuftrNr). AuftrNr is Order Number.
When I take a old Version of the app with the same diagram script but load new data in it it doesn't show the equal parts. So when it's not because of the data and noch because of the diagram script it's because of the script in the script Editor or bad Connections between tables?
Maybe the data is not correct? Instead of using pie charts, use tables to investigate problems like this. This makes it easier. Do you know for certain that the tables are linked? Are there no combinations like you describe for the 50/50 pie chart after making a selection?
I'm getting this, just as you describe and the way is should work right?
Jordy
Climber
Using tables is a good idea. It's a lot of data so I cant count by myself. So I checked the table in the Datamanager. There is a Diagramm that counts the test typs.
I cut the test typs because I don't know what I'm allowed to share. Here you see there are 6626 entries in the whole table. But in the next table the sum of the right coloumn isn't 6626. I think i should be? Because Count(AuftrNr) should Count how much cows there are.
This is what my Diagram counts. I just noticed that the 263 could be true for the unique occurrences of Order Numbers.
That would mean that Count(distinct AuftrNr) - 'AuftrID' and 'AuftrNr' is pretty much the same. Counts the the unique occurrences of test typs. And Count(AuftrNr) Counts the unique occurrences of the order numbers.
But: When I use Count(AuftrNr) because it (maybe?) shows what I want I still have the equal parts Problem. When I select for example KK I have 4 equal part.
And yes, your photo seems to Show what I want to see. Besides that I have a lot more data of cause.
Thanks
Hannah
I can't edit my replies.
Acutally I have no idea what Count(distinct AuftrNr) Counts. If it was the amount of different test types it would be 16 in every row.
Edit:
...I'm confused. For one test typ it calculates 93 entries in the datamanager. That's correct. It's the same like in the database. But in the diagram count(AuftrNr) is 250 and that's not possible. There can't be more Order Numbers than Entries in total.
Sorry, that this is such a mess. I can't even discribe my Problem because I can't find regularities in it. It just doesn't make sense.
Here is a secon example, where it doesn't work:
The datamanager counts the components right:
But when I use Count(AuftrNr) in the diagram the values are wrong: