Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello There,
I have concern regarding how to count null in 2 fields, its like
=Count(Item_1)(SerialNo.1) not equal (Item_2)(SerialNo.2). See below sample data.
Item_1 | Serial_No.1 | Item_2 | Serial_No.2 |
R101138 | KSW10E016034 | R101138 | KSW10E016034 |
R101139 | KSW10E007333 | R101139 | KSW10E007333 |
R101150 | KYA10E003635 | - | KYA10E003635 |
R101150 | KYA10E003505 | - | KYA10E003505 |
R100693 | 53S-038109 | R100693 | 53S-038109 |
R100869 | G3C9E0031622 | - | G3C9E0031622 |
R100870 | G3C9E0052369 | R100870 | G3C9E0052369 |
R100874 | G3E4E-0296585 | - | G3E4E-0296585 |
R100905 | G3E3E0051832 | - | G3E3E0051832 |
R100906 | E3U8E-0130086 | - | E3U8E-0130086 |
R100907 | E3U8E-0133025 | R100907 | E3U8E-0133025 |
Best Regards,
Bing
Not sure what is your expected output or if this is what you are looking for check below?
NullValues:
LOAD *, IF(Item_1_NullCount <> Item_2_NullCount, 1, 0) AS NullEqualCnt;
LOAD *, IF(Len(Trim(Item_1)) =0 OR Len(Trim(Serial_No.1)) =0, 0,1) AS Item_1_NullCount,
IF(Len(Trim(Item_2)) =0 OR Len(Trim(Serial_No.2)) =0, 0,1) AS Item_2_NullCount INLINE [
Item_1, Serial_No.1, Item_2, Serial_No.2
R101138, KSW10E016034, R101138, KSW10E016034
R101139, KSW10E007333, R101139, KSW10E007333
R101150, KYA10E003635, , KYA10E003635
R101150, KYA10E003505, , KYA10E003505
R100693, 53S-038109 ,R100693, 53S-038109
R100869, G3C9E0031622, , G3C9E0031622
R100870, G3C9E0052369, R100870, G3C9E0052369
R100874, G3E4E-0296585, , G3E4E-0296585
R100905, G3E3E0051832, , G3E3E0051832
R100906, E3U8E-0130086, , E3U8E-0130086
R100907, E3U8E-0133025, R100907, E3U8E-0133025
];
Hi Vishwarath,
Thank you so much for your fast support actually what i want is to count all null at Item_2, that Serial_No.2 is equal to Serial_No.1.
Regards,
Bing
Hi,
You can try this
if(len(trim(Item_2)) = 1 and Serial_No.2=Serial_No.1 , 1,0) as nullitem
add the above condition in script and =count({<nullitem={1}>}nullitem) use this as expression