Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
MeehyeOh
Partner - Creator
Partner - Creator

Why difference in calculation results with or without Dollar-sign expansion?

Hi, 

I created an expression using the "AddMonths" and "MonthName" functions to calculate yearmonth about 2 months ago.

However, the same expression comes out differently depending on whether or not the Dollar-sign expansion.

The difference is the format of the value returned.

(**In the image below, the KPI chart is set the same number formatting : "Auto"**)

MeehyeOh_0-1716531782266.png

Expression without Dollar-sign expansion : Numeric

Expression with Dollar-sign expansion : Date

 

Why are the results different?

 

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

Monthname() returned a dual() with a formatted date in the string-part and a number. The $-sign expansion is an adhoc variable and variables aren't dual else they contain always the string representation which means in your case it's only a string which looked like a date.

View solution in original post

3 Replies
marcus_sommer

Monthname() returned a dual() with a formatted date in the string-part and a number. The $-sign expansion is an adhoc variable and variables aren't dual else they contain always the string representation which means in your case it's only a string which looked like a date.

MeehyeOh
Partner - Creator
Partner - Creator
Author

Hi @marcus_sommer 

Thank you for reply.

You mean when calculating a dual value return function through a  $-sign expansion, I always get a string value?

marcus_sommer

Yes, a variable contained always a string - which might be interpreted as string or as number depending on the used context but never be a dual().