Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table with 3 dimensions (Dim1, Dim2,Dim3)
I want to show a table containing :
1st column : count(Aggr(count(*),Dim1,Dim2,Dim3))
2nd column : count(Aggr(count(*),Dim1,Dim2)) => wich is a total fixed value that I will use in calculating other dimensions
Finally I want something like this
Dim1 | Dim2 | Dim3 | Total |
Line1 | Line1 | Line1 | FixedTotal |
Line2 | Line2 | Line2 | FixedTotal |
Thanks in advance for your help !
You should use TOTAL keyword for outer analysis
Count(TOTAL Aggr(Count(Technique), Number, Place, Type))
Please post some rows of data to understand more clear
Number | Place | Type | Technique |
1 | 1 | D | G |
1 | 1 | D | L |
1 | 2 | P | G |
1 | 2 | P | L |
1 | 3 | A | G |
1 | 4 | A | G |
I count Technique rows like that : count(Aggr(count(*), Number, Place, Type, Technique))
Technique | Nb Technique count(Aggr(count(*), Number, Place, Type, Technique)) | Total count(Aggr(count(*),Number,Place,Type)) |
G | 4 | |
D | 2 |
I want to calculate total this way : count(Aggr(count(*),Number,Place,Type)) without considering Technique and it should be the same value for all the rows
In our example Total should be = 4 and not 6
One more thing, Why you want to exclude "L" from technique to the total, Any logic behind?
We can consider fields Number,Place,Type as a Place ID and Technique as signal techniques that covers places
so to count the total number of places covered by any signal we should count only occurences by Number,Place,Type
=> Total Number of places=4
=> G=4/4 = 100%
=>L=2/4=50%
If i understand correctly, Try this way
Count(Aggr(Count(Technique), Number, Place, Type))
Yes that's how I count Total but I want to make it as a fixed value in all rows so in the same table I want to have 2 different expressions :
Expression 1: Count(Aggr(Count(Technique), Number, Place, Type, Technique))
Expression 2 : Count(Aggr(Count(Technique), Number, Place, Type)) => Fixed TOTAL
but it doesn't work
You should use TOTAL keyword for outer analysis
Count(TOTAL Aggr(Count(Technique), Number, Place, Type))
Works perfectly. Thanks !!!