Skip to main content
Announcements
Global Transformation Awards submissions are open! SUBMIT YOUR STORY
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitians
Creator III

Variable not working

Hi Friends,

I have expression,

Count(Distinct {$<[$(=Concat({1<$Table-={'Readership','DimDocument','DimAuthor','MasterCalendar','DimClient','DimClientContact',

'DimEmployee','BridgeTab'}>}distinct $Field,']=,[')&']=')>} RSHitID)

which works perfectly Fine

But when i Store the set analysis in variable and use as following,

count(distinct {<vReadershipFilters>} RSHitID)

vReadership=

'['&Concat({1<$Table-={'Readership','DimDocument','DimAuthor','MasterCalendar','DimClient','DimClientContact',

'DimEmployee','BridgeTab','DimClientTier','DimSalesCoverage'}>}distinct $Field,']=,[')&']='

After using variable the expression is not working properly,

Please help if i am doing any mistake while storing in varibale.

Thanks,

Rohit Yadav

7 Replies
sunny_talwar

May be try with dollar sign expansion of the variable

Count(DISTINCT {<$(vReadershipFilters)>} RSHitID)

rohitians
Creator III
Author

Hi Sunny,

Thanks got it..

without $ it wont be possible right?

sunny_talwar

Not in this scenario. But is there a reason you want to use it without dollar sign expansion?

rohitians
Creator III
Author

Hi Sunny,

Actually this is for Qliksense

Yes because business users may not understand what $ means so..

Thanks,

Rohit Yadav

sunny_talwar

Why do they need to look at the expression?

rohitians
Creator III
Author

For self serve if they want to use and make their expressions...

sunny_talwar

If your users are knowledgeable enough to create an expression like this

Count(DISTINCT {<vReadershipFilters>} RSHitID)

I am sure you can convenience them to use this instead

Count(DISTINCT {<$(vReadershipFilters)>} RSHitID)

All you are asking them is to add dollar sign expansion which evaluates the variable. If you are unable to do this, then I don't think you have any other alternative.