Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use calculated dimension label as normal field in expressions

I created a table field from calculated dimensions and I named the label as COLUMN_A

COLUMN_A  

singapore

usa

hong kong

Can I use this COLUMN_A as a normal field in my expressions? How can I do this? Thanks

8 Replies
hector_munoz
Specialist
Specialist

Hi Desmond,

What do you exactly need? Sometimes you can put a dimension value in an expression with no problems. You simply put the name of the field.

Regards,

H

Not applicable
Author

As you can see, I have created a calculated dimension and named is 'Entity Company'. 'Entity Company' contains SG, OTHERS, MY, ETC.

Now, I want to use this 'Entity Company' in my expression. For example, IF([Entity Company] = 'SG', do something......). But as you can see, it is highlighted in error red. How do I use this new dimension that I have created?

neha_shirsath
Specialist
Specialist

Hi,

You can use Set Analysis for this like-

if(substringcount(line Description,'5.3')>0, sum({<Entity Comapny={'SG'}>}Date1))

Thanks,

Neha

Not applicable
Author

Hi Neha,

Entity Company has no relationship with the Sum({[Date1] * $<[COMPANY CODE] = {SG}, LEVEL2={5.3} ADJ_BAL_SGD>}). Entity Company is a newly created dimension therefore this would not work. thanks for your help tho

Not applicable
Author

Hi Desmond,

please correct if my understanding is wrong, you created a calculated dimension and named it as "Entity Company" in the label. Now you are trying to use that label in your expression, you cant use your label in your expression because it don't hold any value. you can name it as anything you like. if you want to use it in the expression create that in the script and use it in the front end.

Thanks

Anonymous
Not applicable
Author

hi..

If my understanding is correct, then what you have declared in your dimension should also be declared the same in your expression.

Anil_Babu_Samineni

This should work until Date1 has Numbertic. If character it won't work you should use data point for aggregation


If(SubStringCount([Line Description],'5.3.')>0 and [Entity Company] = 'SG' , Sum(Date1), 'NILLL')

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
neha_shirsath
Specialist
Specialist

What your Entity Company fields contains? its SG?

if yes, then Company code also has same SG value.

So your Entity Company and Company code has same values?

Thanks,

Neha