# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## Amount Format

Hello All,

I was trying to build a logic for last 12 months spend and below is the logic

/\$(vAmountDivisor),\$(vFormat))

variables I used

1) vAmount =

if(vSpendType = 'Sourceable', (if(is_sourceable = 'Y', amount))

, if(vSpendType = 'SC Manageable', (if(is_sc_manageable = 'Y', amount))

, amount))

2)vAmountDivisor =

if(vMoney ='Thousands',1000,

if(vMoney = 'Millions', 1000000,

if(vMoney = 'Billions', 1000000000,1)))

3)vFormat

if(vMoney ='Thousands','\$#,##0.00K',

if(vMoney = 'Millions', '\$#,##0.00M',

if(vMoney = 'Billions', '\$#,##0.00B','\$#,##0.00')))

Data is not getting displayed,Can anyone let me know if the calculation needs any correction,

TIA

1 Solution

Accepted Solutions
Honored Contributor III

## Re: Amount Format

- I think one bracket at wrong place, also I don't see num or money in the front, can you share the correct expression? -

/\$(vAmountDivisor)),\$(vFormat))

3 Replies
Honored Contributor III

## Re: Amount Format

- I think one bracket at wrong place, also I don't see num or money in the front, can you share the correct expression? -

/\$(vAmountDivisor)),\$(vFormat))

New Contributor III

## Re: Amount Format

Thank you so much it worked by adding Money and adding a bracket after vAmountDivisor.

Contributor III

Hi Raman,

Thanks,

Carlos