Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Sunil_Kenth
Former Employee
Former Employee

Formatting in a text box when using variable

Hi

I have a variable that am using in a text box.  I would like to format the number in the text but not sure where i should use the num function.  This is the expression in the variable:

=

if(only(CCY_2) = 'GBP',

sum(RevenueDailyGBP),

if(only(CCY_2) = 'USD',

sum(RevenueDailyUSD), sum(RevenueDailyGBP)

))

This is what i have tried to modify it to but it doenst work:

=

if(only(CCY_2) = 'GBP',

 

num(sum(RevenueDailyGBP),'#,##0'),

 

if(only(CCY_2) = 'USD',

 

num(sum(RevenueDailyUSD),'#,##0'), num(sum(RevenueDailyGBP),'#,##0')

 

))

Any ideas how i can do this?

Thanks,

Sunil

1 Reply
Anonymous
Not applicable

Sunil,


You can keep the format part separately:

num(
if(),  your expression based on conditions
if()  formatting based on conditions
)

In general, I'd rather have several conditional text boxes, each formatted for its currency, and show one on another depending on currency.

Regards,
Michael