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: 
Akhil1995
Contributor
Contributor

Aggr issue kindly help

hello folks, hope you are well.

 

I have been facing issue while applying aggregations on this below scenario.

 

Due to some sensitive information, im not able put exact scenario here, instead im trying put in my own way.

 

I have table like this.

Load* inline

[Month,StoreCode, Region, Val

Jan-23,AA,, 10

Jan-23,BB,B1, 20

Jan-23,BB,,20

];

 

My desired output is

Month  StoreCode  Region Sum(Val)

Jan-23  AA       10

Jan-23  BB B1 20

Total                   30

 

 

I have tried with below aggr but no luck

If(

Count(total <StoreCode>StoreCode)=1 or Len(Trim(Region))>0, Sum(Val)

)

But not showing totals.

 

I request you to help me out on this.

 

Looking forward to hearing from you!

 

 

Labels (2)
1 Reply
Marijn
Creator II
Creator II

Hi @Akhil1995 , of what do you want to calculate the totals? Because if you want to do it for every store, or every store and every year / month, you can just use those as dimensions?

Are you trying to do this in script or in chart? For in chart you can try this:

So use the following dimensions: Month, StoreCode
and the following expression: Sum(Val)

You can also incorporate selections in your expression:
Sum( {$< Storecode = {"*"}, Region={"*"}>} Val)

I tried to interpret what you want to select from you selection, but it's not completely clear to me. Please give some more context for additional help.