Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'd like to know how to do the following process. I have a straight table so far that looks like this.
Team | Value |
---|---|
A | 20 |
A | 40 |
A | 10 |
B | 10 |
B | 30 |
C | 40 |
C | 10 |
The values come from an expression which uses if, aggr and sum functions. I would like to produce a new table which adds up the value for each team. So we can end up with something like this.
Team | Total Value |
---|---|
A | 70 |
B | 40 |
C | 50 |
It would be much appreciated if someone can help.
Cheers
Try this?
Table:
Load Team, Value From Table;
T2:
NoConcatenate
Load Team, Sum(Value) as Value Resident Table Group By Team;
Hi,
Silly question but would you write something like this in the script of Qlikview? I have normally been using the 'New Sheet Object' option to create tables.
Cheers
It will be good, if you can share the sample application or the dimension and expression to understand the requirement clearly.
Try like this:
Chart - Straight table
Dim - Team
Expression - Aggr(Sum(Value),Team)
Perhaps it's easier if I explain more thoroughly how the values are obtained.
So we have ValuesA for each player in each team. I.e. something like,
Team --- Player -- ValuesA
A 1 4
A 2 8
A 3 1
B 8 7
Now in the table I have described in the original post, the values are obtained by the following.
If ValuesA for each player < A limit I have set, then return the ValuesA. Else, give me the limit.
So if this limit was 6, then for the main table we would get the following:
Team ---- Value
A 4
A 6
A 1
B 6
And from this table, I would like to do the following (add up value for each team):
Team ----- Value
A 11
B 6
Try this for expression in new table with dimension as Team:
sum(aggr(value,team))
Can you share the actual expression your Value field is generated?
Based on below sample can you elaborate what you mean by limit?
Team --- Player -- ValuesA
A 1 4
A 2 8
A 3 1
B 8 7
If ValuesA for each player < A limit I have set, then return the ValuesA. Else, give me the limit. ->
Quite did not understand what you mean highlighted above. Can you elaborate please.
The script already in place. If you want in UI you can do following steps.
Create Straight table
Dimension - Team
Measure - Sum(Value)
This information enough to get same answer. IF your question got answer we recommend you to close this thread by flag "Correct answer" and helpful for other which is useful for you