Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kkkumar82
Specialist III
Specialist III

values on data points loosing number format when located in the bar

Hi all,

I have a combo chart where the values of line and bar are overlapping, so I decided to plot the values inside the chart but when Iam doing this the money format with millions is lost and the bars are showing complete value.

Any help??

Thanks

Kiran Kumar

5 Replies
MK_QSL
MVP
MVP

Check enclosed file...

kkkumar82
Specialist III
Specialist III
Author

Hi Manish,

I have implemented a similar kind of solution but because the values may be thousands , millions, or billions I have created a parameterised variable like below

if($1 < 1000, $1,

  if($1 > 1000 AND $1 < 1000000, $1/1000,

  if($1 > 1000000 AND $1 < 1000000000, $1/1000000,

  $1/1000000000

  )

  )

)

this is working fine for my problem but one of my expression is like this

Sum({<QuarterYear={$(vCurrentQuarter), $(vLastQuarter1), $(vLastQuarter2), $(vLastQuarter3)}>}Spend))

but when I am using that variable

$(vNumConverter(Sum({<QuarterYear={$(vCurrentQuarter), $(vLastQuarter1), $(vLastQuarter2), $(vLastQuarter3)}>}Spend))) its not displaying any thing.

I even tried dual , but to my strange the bars are displaying but the string value is for all bars is taking same.

The expression which I have used is like this.

if($(vNextQuarterButton)=1,

  dual(num($(vNumberConverter($(=$(vCurrentQuartersSpend(1))))),'#.00')&$(vNumberConverterSym($(=$(vCurrentQuartersSpend(1))))),Sum({<QuarterYear={$(vCurrentQuarter)}>}Spend))

,

  dual(num($(vNumberConverter($(=$(vCurrentQuartersSpend(2))))),'#.00')&$(vNumberConverterSym($(=$(vCurrentQuartersSpend(2))))),Sum({<QuarterYear={$(vCurrentQuarter), $(vLastQuarter1), $(vLastQuarter2), $(vLastQuarter3)}>}Spend))

  )

In the above expression

vNumberconverter :

if($1 < 1000, $1,

  if($1 > 1000 AND $1 < 1000000, $1/1000,

  if($1 > 1000000 AND $1 < 1000000000, $1/1000000,

  $1/1000000000

  )

  )

)

vCurrentQuartersSpend :

if($1=1,

  Sum({<QuarterYear={$(vCurrentQuarter)}>} Spend)

,

  Sum({<QuarterYear={$(vCurrentQuarter), $(vLastQuarter1), $(vLastQuarter2), $(vLastQuarter3)}>} Spend)

)

vNumberConverterSym:

if($1 < 1000, '',

  if($1 > 1000 AND $1 < 1000000, 'T',

  if($1 > 1000000 AND $1 < 1000000000, 'M',

  'B'

  )

  )

)

num.png

but the bar char is displaying same values, I think the string part in dual is not able to take dimension.

The expressions were absolutely working for only this expression Sum({<QuarterYear={$(vCurrentQuarter)}>} Spend)

without using dual.

Thanks

Kiran Kumar

MK_QSL
MVP
MVP

Better to divide by 1000, 1000000 and use Symbols from Number Tab

kkkumar82
Specialist III
Specialist III
Author

yeah Iam using the same but my values are not always in Millions so I used another variable for symbols, that not an issue I resolved it but in the final, dual function is behaving differently.

Thanks

MK_QSL
MVP
MVP

Check enclosed sample file and change according to your need.