Crisitian, Welcome to QlikCommunity!!! Please find below the script meeting your requirements. Please replace the WorknetExtract inline table with your datasource. Attached is the sample file for your reference. I hope it helps.
LOAD * INLINE [
LOAD DISTINCT Worknet,
COUNT(UserName) AS Count
GROUP BY Worknet;
DROP TABLE WorknetExtract;
WorknetUserExample.qvw 136.8 K
Thanks a lot for your answer !
I don't really think that is my desired solution. Maybe I didn't express myself more exactly ...
I have a lot's of Worknets with different number of users. My desired graph or table way is to see how many (as number) worknets have a specific number of users, for example: 3 Worknets have 1 User, 5 Worknets have 2 Users, 7 Worknets have 3 Users .... 14 Worknets have 5 - 10 Users, 11 Worknets have 10 - 20 Users and 34 Worknets have more than 20 Users ...
I hope it's more understandable now ...
Cristian, I can understand. However, attached is the qvw aligned with your requirements. Please send me a sample dataset if this doesn't help and I can see if I can provide you a ready to use solution.
WorknetUserExample.qvw 137.5 K
Due confidentiality reason I am not allowed to post any of my data ...
I have hundreds of worknets on my data .. and those should be categorised.
I try to use your ideea but I guess the database structure of mine is kind of complex and not to simple to insert in my script ..
I keep on trying to find a workaround for my goal.
Thanks a lot.
Here is the elegant solution to my problem: Aggr function !
To calculate the number of users,I used the function sum(#Users), and the identifier for worknets is Worknet_ID for example.
The dimension will be Aggr(sum(#Users), Worknet_ID). This will give a number as a result, which is the number of users for a worknet.
As the expression I used count(Worknet_Id) or sum(#Worknets) or something like that and use also DISTINCT.
For the classes: input manually as belllow:
If( aggr(sum(#Users), WorknetId)<5, aggr(sum(#Users), WorknetId),
If(aggr(sum(#Users), WorknetId)<10, ‘5-10’,
If(aggr(sum(#Users), WorknetId)<25, ‘10-25’)))
Succes on your QlikView Projects.