Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for
Did you mean:
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])

3 Replies
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

Perhaps this way?

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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
MVP

May be this

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

Tags