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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

String Value in expression ?

Hi,

It's possible to use String value in expression ?

I've tried :

  • =[MyStringValue]
  • =Capitalize([MyStringValue])
  • =Text([MyStringValue])
  • =Chr([MyStringValue])

They all return null...

Thanks in advice,

12 Replies
rajeshvaswani77
Specialist III
Specialist III

Hi,

It seems, [MyStringValue] itself has Null.

thanks,

Rajesh Vaswani

MarcoWedel

what is [MyStringValue]?

field?

variable?

string constant? Did you use single quotes?

regards

Marco

Not applicable
Author

When I use it in Dimension and not in Expression, I didn't have Null Value.

Maybe there is a way to put a Dimension between 2 expressions like that :

[ID] - [Name] - [MyStringValue] - [AVG(COST)] - [SUM(COST)]

1 - Test - What ever it's just a string value - 36$ - 140$

2 - Bar - Fuuuu - 2$ - 89$

3 - Its - Over - 9000$ - 9000$

Dimension : [ID], [NAME], [MyStringValue]

Expression : [SUM(COST)], [AVG(COST)]

IAMDV
Master II
Master II

Easy if you can post the sample QVW. Looks like you're losing granularity of data when you move the field from Dimension to Expression. Please try using in both Expression and Dimension to see if it works.

Thanks,

DV

www.QlikShare.com

Not applicable
Author

That's strange. When I create a Dimension & a Expression with it, they are both visible and so not null.

But When I delete the dimension, the expression is null.

Why ?

Thanks in advice,

Not applicable
Author

Here two picture for more understanding :

er1.PNG.pnger2.PNG.png

hic
Former Employee
Former Employee

It's simply that QlikView needs an aggregation function as expression. Otherwise it doesn't know which of several values to return... So, try Mode() or FirstSortedValue().

http://community.qlik.com/blogs/qlikviewdesignblog/2013/08/06/it-s-all-aggregations

HIC

IAMDV
Master II
Master II

Just adding to what HIC mentioned above.

Here is the video tutorial on FirstSortedValue function.

http://qlikshare.com/tag/firstsortedvalue/

Good luck!

Cheers,

DV

Not applicable
Author