Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group Name using in Experssions

Hi Experts,

I have two or three groups available in our application. For Ex DRL_Sal_Cntry is a Drill Down group, in this group having Dimension are Country,Year. CYL_YR_Lcl is Cyclic group, in this group having dimension are Year,Country,Lcl_Region.Here, i want use this group name Expressions, i try to this script Sum(GetCurrentField('DRL_Sal_Cntry'),Sales), but it's error.One more doubt is't possible to use both cyclic group and drill group one chart and expressions also.

9 Replies
Anonymous
Not applicable
Author

Hi Raja

What are trying to get with the expression? you can't just put a field name within SUM function, it has only one argument.

You can use the "total" aggregation for example like this: SUM( total <Country> Sales).

You can create a variable vDim. define it as: GetCurrentField('DRL_Sal_Cntry')

After that you can try: SUM(total <$(vDim)> Sales)

Yaniv

Not applicable
Author

Hi Raja,

I am Agree with Yaniv,

and also you can use the method of the calculated dimension in your chart.

i did not clear with your requirement can you put some example here.

Not applicable
Author

Hi Raja,

I believe you were trying to achieve the aggregation of Sales with respect to the field selected in the grp.

For that the expression that you wrote is obviously errorneous.

The correct expression would be

AGGR(SUM(Sales), GetCurrentField('DRL_Sal_Cntry'))

Hope that helps,

Abhinava

Not applicable
Author

Hi,

Thanks for respond Kumar and Yaniv , i want use group name in our expressions.

i no need to create separate Variable at all. In our application more the ten groups.

For Ex,

Sum(<'Group Name'>,Sales).

Not applicable
Author

Hi Abinava Chandra,

Thanks for your responding my query, but it is not working fine, " No data Display",

Example script ,

in our data,

Country,Year,Month,Group,Sales

India,2013,Jan,A,11

UK   ,2013,Jan,A,21  like that , here, 1st Group(Drl_YR_CNRY), i want sum of sales this group wise.

Not applicable
Author

Hi Raja,

For that you can use a straight table with Drl_YR_CNRY and Group as dimensions and Sum of Sales as expression.

Abhinava

Not applicable
Author

Hi Abinava Chandra,

Thanks for your responding my query,

This already exhausting chart.Anyway i try to this.Please send me syntax using group name in expression. No need  to Aggregate(AGGR) value here..

Regards,

Raja.

Not applicable
Author

Well it seems your requirement is still not clear for the audience.

Try to describe it pictorially in excel maybe so we have a clear idea.

Thanks,

Abhinava

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try giving all the dimensions in the group and check

=Sum(TOTAL <GroupDimension1, GroupDimension2, ..........> MeasureName)

Regards,

Jagan.