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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
dudumoscona
Contributor
Contributor

subtraction between to fields not showing results

Hi ,

I have the following script , the subtraction in the end giving no results , i've added a picture of no result

What am i doing wrong?

INVENTORYCDP1:

LOAD PARTNAME AS [PartIDPriorityCDP] ,
PARTDES AS [PartNamePriorityCDP],
COST AS [COSTPriorityCDP],
WARHSNAME AS [WARHSNAMEPriorityCDP],
INVENTORYLEVEL AS [INVENTORYLEVELPriorityCDP],
UNIT AS [UNITPriorityCDP],
TOTALCOST AS [TOTALCOSTPriorityCDP]
FROM
[..\..\1_resources\1_Raw\INVENTORYCDP.QVD]
(
qvd);

LEFT JOIN

LOAD PARTID AS [PartIDPriorityCDP],
LOCATIONID AS [WARHSNAMEPriorityCDP],
Num(ONHAND, '0') as ONHAND ,
RepairCenterName

FROM
[..\..\1_resources\1_Raw\INVENTORYLEVELCMMS.QVD]
(
qvd);

STORE INVENTORYCDP1 INTO [..\..\1_resources\1_Raw\INVENTORYCDP1.QVD];
DROP Tables INVENTORYCDP1;

Directory;
LOAD PartIDPriorityCDP AS [PartIDPriorityCDP1] ,
WARHSNAMEPriorityCDP AS [WARHSNAMEPriorityCDP1],
PartNamePriorityCDP AS [PartNamePriorityCDP1],
COSTPriorityCDP AS [COSTPriorityCDP1],
INVENTORYLEVELPriorityCDP AS [INVENTORYLEVELPriorityCDP1] ,
UNITPriorityCDP AS [UNITPriorityCDP1],
TOTALCOSTPriorityCDP AS [TOTALCOSTPriorityCDP1] ,
ONHAND AS [ONHAND CMMS],
RepairCenterName AS [RepairCenterName1],



(INVENTORYLEVELPriorityCDP
- ONHAND) as [DIFF BETWEEN SYSTEMS]

FROM
[..\..\1_resources\1_Raw\INVENTORYCDP1.QVD]
(
qvd);

1 Solution

Accepted Solutions
jerifortune
Creator III
Creator III

Have you tried to convert the two fields to numeric values before performing the subtraction?

View solution in original post

4 Replies
jerifortune
Creator III
Creator III

Have you tried to convert the two fields to numeric values before performing the subtraction?

Anil_Babu_Samineni

May be scroll to the right and see, If values are coming as Zero?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
dudumoscona
Contributor
Contributor
Author

Hi ,

Tried to put

Num(Field) and tried Num#(Field) - none worked.

dudumoscona
Contributor
Contributor
Author

Nothing comes.