Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
bbastro1106
Contributor III
Contributor III

Count with 2 conditions

Hi All,

 

I am now working on a expression to perform a distinct count for SKU number,  if 2 criteria match:

1) If PO total units <> 0

2) If PO total Unit - Original Unit < 0

I try below expression, but it cannot give me the correct result.

Count(Distinct {<[SKU Number]={"=Sum({$<[PO Total Units] = - {0}>} [PO Total Units]-[Original Units])<0"}>} [SKU Number])

4-25-2019 4-45-33 PM.jpg

Can anyone please help?

3 Replies
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

Hope this solution works for you,

if(Sum([PO Total Units]) >=600 and (Sum([PO Total Units])-Sum([Original Units])) > 30,Count(distinct [SKU Number]),0)

Thanks,

Thanks and Regards
Kashyap.R
Anil_Babu_Samineni

Perhaps this way?

Count(Distinct {<[SKU Number]={"=Sum({$<[PO Total Units] -= {'0'} and ([PO Total Units]-[Original Units])<0">} [SKU Number])

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
sunny_talwar

May be this

 

Count(DISTINCT {<[PO Number] = {"=[PO Total Units] <> 0 and [PO Total Units] - [Original Units]) < 0"}>} [SKU Number])