Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

problem in dimension calculation

Hii All,

I am using Add calculated dimension and providing expression as =sum({<str_coa_description={'Total Revenue','Revenue from operations','EBITDA','EBITDA Margin','PBT(before Exceptional & Extraordinary items)'}>}str_coa_description) which is giving me error in calculating dimensions.....my task is to add only these column values in dimension of straight table where str_coa_description is one of my field.

please help.

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You need to put an aggr around your expression: aggr( ...yourexpression..., Dim1, Dim2, ...etc). Replace Dim1, Dim2, ...etc with the other regular dimensions of your straight table.

BTW str_coa_description sounds like it's a description, not a number. Trying to sum a text field won't work.


talk is cheap, supply exceeds demand
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

In dimension Direct Sum, Count functions are not allowed it should be used with the help of Aggr. Also you trying to Sum the string field(Text). Sum can be used for Numeric field

I Hope you need something like this

=Aggr(If(Match(str_coa_description, 'Total Revenue','Revenue from operations','EBITDA','EBITDA Margin','PBT(before Exceptional & Extraordinary items)'),  str_coa_description), str_coa_description)

Or simply

If(Match(str_coa_description, 'Total Revenue','Revenue from operations','EBITDA','EBITDA Margin','PBT(before Exceptional & Extraordinary items)'),  str_coa_description)

Hope it helps

Not applicable
Author

it is again giving me same problem by using aggr(), and the second method you sent giving me no value...any other way to handle it?

CELAMBARASAN
Partner - Champion
Partner - Champion

Could you please attach sample file.

Also could you tell me what expression you are using?