Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
emteam162
Creator
Creator

Scale

Hi,

I have this data

Month20112010
Janv609 kg958 kg
Fev476 kg994 kg
Mar366 kg860 kg
Avril80 kg731 kg
Mai308 kg832 kg
Juin588 kg698 kg
Juil431 kg485 kg
Aout303 kg540 kg
Sept374 kg503 kg
Oct535 kg1,075 T
Nov422 kg766 kg
Dec456 kg491 kg

and i want have the bar chart but i have issue with scale (with T is TONNE )

see attache please.

Any idea to solve this

Many thanks

Emteam

6 Replies
nagaiank
Specialist III
Specialist III

I presume that you are loading the data in Qlikview as number along with the unit of measure. Try convert Tonne into Kg at load time and display the numeric data on the chart.

Hope this helps.

emteam162
Creator
Creator
Author

Hi,

Thank you for anwser.

I am loading the data without Unit but the default unit is KG.

My client want to convert data kg into Tonne but if sum(data) are > 1000 i will diplay tonne if sum(data) < 1000 then i display Kg as unit

If you see my first attached my graph dosen't correct

Best Regards,

Emteam

emteam162
Creator
Creator
Author

Hi,

Any idea???

Thanks

Not applicable

I believe you are loading two fields into the app. First with everything converted to KG and other one with string formats codes (1T, 100 Kg etc). In that case you can create a chart and write and expression in Sort tab of properties. Something like Sum(FirstField) should give you correct sorting.

Remeber to select the dimension and promote it to first one in the sorting

Go to properties>Sort tab>(select the check box for expression)> then write the expression that you want for sorting..

Gysbert_Wassenaar

Try using the dual function:

dual(if(sum(data)>1000,num(sum(data)/1000,'#,###.00 T'),num(sum(data),'#,###0 Kg')),sum(data))


talk is cheap, supply exceeds demand
emteam162
Creator
Creator
Author

Hi Gysbert,

Your solution is working

Many thanks for your help

Please, can you explain me the dual function ?

Best Regards,

Emteam