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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
jjustingkm
Creator II
Creator II

Concatenation with $ sign

I am using the below expression to prefix a KPI with $ symbol, but $ is not added as expected. Any help is appreciated.

='$ ' & [MEASURE]          - result is same as [MEASURE]

='$abc ' & [MEASURE]    - result is            $abc [MEASURE]

Labels (1)
6 Replies
MatheusC
Specialist II
Specialist II


num([MEASURE],'$ # ##0,00')
or
num([MEASURE],'$ #,##0.00')

and set the format to "Measurement Expression"


- Regards, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

As @MatheusC suggested you could use money number format.

Main question is:  what are you trying to achieve? What you are showing should work if you use correct settings. The reason this does not work for you is that likely you already have other format set on the measure as presented below:

Lech_Miszkiewicz_0-1764806714852.gif

 

cheers Lech, 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 to the problem.
jjustingkm
Creator II
Creator II
Author

When I use money number format, the large amount is not showing in the shortened form (billions, millions etc.) I know I can use some if conditions to achieve it, but dont want use any formulas because I am dealing with a large data set. 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

In this case you may need to use if() condition.

I understand that you may be working with large data volume but it does not mean your If() has to be slow. Yes there will be little bit of overhead but It all depends how you write the formula. Since we are just interested in format calculation your "If" will not have any impact on the measure calc time.

It can be something similar to: 

=pick(ceil(log10(([MEASURE]))/3),

num(([MEASURE]),'$ #,##0.0'),

num(([MEASURE])/1000,'$ #,##0.0 K'),

num(([MEASURE])/1000000,'$ #,##0.0 M')
)

The above will give you dimension level format, but if you want to have one general format  then you could even $() expand it...

cheers Lech, 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 to the problem.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

To add to that.. If you do this in chart which has axis you may need to use something like below to retain proper scale:

=Dual(text(pick(ceil(log10(([MEASURE]))/3),

num(([MEASURE]),'$ #,##0.0'),

num(([MEASURE])/1000,'$ #,##0.0 K'),

num(([MEASURE])/1000000,'$ #,##0.0 M')
)),[MEASURE])

cheers Lech, 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 to the problem.
Nagaraju_KCS
Specialist III
Specialist III

try with this 

='$\ ' & [MEASURE]

This tells the Qlik engine to treat the appended character as a literal string value, preventing it from being interpreted as a variable expansion operator.