Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr Expression is not working

Hi All,

I am replicating HIC blog example given in When should the Aggr() function NOT be used?

hic

stalwar1

swuehl

jagan

Manish Kachhia

Given Example:

Total.png

Replication with the expressions:

Not_Use_Aggr.PNG

But for me I am getting 176 values for all the expressions.

I want to replicate the same. How to write the expressions?

Thanks in advance.

Data:

    

Dim1Dim2Dim3Number
AaX2
AbX6
AaY1
AbY4
AaZ1
AbZ6
BcX4
BdX14
BcY7
BdY12
BcZ4
BdZ9
CeX6
CfX22
CeY16
CfY18
CeZ24
CfZ20
4 Replies
Anil_Babu_Samineni

Is this you are expecting?

Capture.PNG  Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

I am expecting this:

Total.png

Anil_Babu_Samineni

I assume, these values you need from KPI(Text Object)

FYI, PFA

Capture.PNG

If you don't have license, Follow those pattern

16 =Sum(TOTAL {<Dim2={'b'}>} Number)

5 =Sum(TOTAL {<Dim3={'Y'}, Dim1={'A'}>} Number)

50 = Sum(TOTAL {<Dim1={'B'}>} Number)

58 =Sum(TOTAL {<Dim3={'Y'}>} Number)

176 =Sum(TOTAL Number)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vinieme12
Champion III
Champion III

I think you have misunderstood the usage of TOTAL here, It  needs to be used in a chart where you have many dimensions and only want the TOTALs referring to a Select dimension and ignoring other Dimensions,, try the total keyword in a straight table with and see for yourself.

in the Text box there are no dimensions to aggregate on, just using the set analysis is enough, the total keyword here is irrelevant, so in text boxes just use

16 =Sum({<Dim2={'b'}>} Number)

5 =Sum({<Dim3={'Y'}, Dim1={'A'}>} Number)

50 = Sum({<Dim1={'B'}>} Number)

58 =Sum({<Dim3={'Y'}>} Number)

176 =Sum(Number)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.