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

Set Expression for Calculated Dimension

Hi all,

I want to have a detached table, but the server option does not support it. I think the workaround is to use set expression. But so far, I have not been able to make it work. Here's my requirement. I need to extract a portion of string from a field named "ItemDescription" and when LinkedAccountId is 123. Below is the original expression. But I need it to be "detached" disregard any selection.

=if(LinkedAccountId='123',trim(subfield(subfield(ItemDescription, 'Sign up charge for subscription: ', 2),',', 1)))

7 Replies
Anil_Babu_Samineni

May be this?

=Only({1} if(LinkedAccountId='123',trim(subfield(subfield(ItemDescription, 'Sign up charge for subscription: ', 2),',', 1))), ItemDescription)

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
sunny_talwar

What is your expression? I think you need to use set analysis in your expression. Assuming it is Sum(Measure), change it to Sum({1} Measure)

Not applicable
Author

This is my expression.

=if(LinkedAccountId='123',trim(subfield(subfield(ItemDescription, 'Sign up charge for subscription: ', 2),',', 1)))


I'm not trying to calculate sum or any calculation. Want to have it as my dimension.

Anil_Babu_Samineni

May be two options over Front End

1) Lock the Field

2) Read only option

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

That only works in the local edition, but not the server edition.

juan_patrick
Creator
Creator

Hi Samuel,

try this:

=mid(

         Only( {1 < LinkedAccountId= {'123'} >}  ItemDescription) 1,2

         )



where 1 and 2 are parameters of mid function.

sunny_talwar

Where exactly are you trying to do this? In a chart? What is the dimension and what is the expression? Would you be able to share an image to clarify what you have? or a sample may be?