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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Kalyani22
Contributor II
Contributor II

Mutiplication in Qlik

I have two fields like 

Order Quantity and Net price Net price in Decimal so I want to include Decimals also. If I use Round Or Floor or Ciel I will miss or Get More Spend.

 

Output should be like This

OrderId Order Quantity Net Price GC T PO Sub Total ( order qty * Net Price GCT)  
101 500 6.04 3020  
101 100 14.39 1439  
         
      2.9B  
         

 

Labels (1)
4 Replies
marksouzacosta
MVP
MVP

Hi @Kalyani22 ,

Your number values are correct. What are you missing is a number formatting.
In this case you can add the Num function in your tables or charts to specify the numeric format you are looking for. 

Following a code sample and the results:

Orders:
LOAD
[OrderId],
[Order Quantity],
[Net Price],
Num([Order Quantity] * [Net Price],'#,##0.00') AS [PO Sub Total]
INLINE [
OrderId,Order Quantity, Net Price
101,500,6.04
101,100,14.39
];

marksouzacosta_0-1715357804396.png

Be aware that you may lose your numeric formats when design charts or exporting data.
When doing charts, make sure to customize the numeric format according to your needs - if you lose your numeric format. This is where you can change it, if that happens:

marksouzacosta_1-1715358149908.png

 

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

Kalyani22
Contributor II
Contributor II
Author

Hi,

I am getting correct format but if i use sum (Po Sub Total) i am getting Double. in some lines getting correct value. I have followed your instructions. I have changed the properties also.

Kalyani22_0-1715684750370.png

 

Kalyani22_2-1715685059758.png

 

Kalyani22_3-1715685141371.png

could you please help me out.

marksouzacosta
MVP
MVP

Hi @Kalyani22 ,

It is hard to say what is happening without seeing the fields and original values behind the charts.

I would suggest creating another Table Chart and add the following fields as Dimensions, don't add Measures, only Dimension:

Purchasing Document
Order Quantity
Net Price GC T
PO_Spend

Select a few of the Purchasing Document exceptions and some that are working well and please share a Screen shot with us. This should reveal what is happening.

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

Kalyani22
Contributor II
Contributor II
Author

Hi,

If add as Dim its getting correct values. but i want to add as Measure. . 

Kalyani22_0-1715782393601.png

 

if add as Measure 

Kalyani22_1-1715782652497.png

 

Kalyani22_2-1715782740784.png

 

Kalyani22_3-1715782909796.png