Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
datashaw
Contributor III
Contributor III

Count the percentages only if its dropped to certain value

Dear Experts,

I'm looking for some assistance  to show the count in straight table expression please.

I want to show the count of percentages, only  if the percentage is dropped below 50%

  
=Count({<Status-={'REJECTED'},Code ={'AP'} Items) / Count({<({<Status-={'REJECTED'}>}Items))
The above expression gives me 40%  so my count is 1.

 I'm trying to execute the Count of items if less than 50% 

example
Dimension= Date, Product
Expression Count of items if the above expression is >50% Items)

hope you understand the requirement and kindly suggest me the solution please 

Labels (3)
5 Replies
Anil_Babu_Samineni

Perhaps this?

=Count({<Items={"=Num(Count(Items), '#,#0%')<0.5"}, Status-={'REJECTED'},Code ={'AP'} Items) / Count({<Items={"=Num(Count(Items), '#,#0%')<0.5"}, {<Status-={'REJECTED'}>}Items)

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)
datashaw
Contributor III
Contributor III
Author

No luck 😞
Anil_Babu_Samineni

This syntax wrong, My bad. correct one is this?

=Count({<Items={"=Num(Count(Items), '#,#0%')<0.5"}, Status-={'REJECTED'},Code ={'AP'}>} Items) / Count({<Items={"=Num(Count(Items), '#,#0%')<0.5"}, Status-={'REJECTED'}>}Items)

Or

=Sum({<Items = {"=(Count({<Status-={'REJECTED'},Code ={'AP'}>} Items) / Count({<Status-={'REJECTED'}>}Items))<0.5"}>} Aggr(NODISTINCT Count({<Status-={'REJECTED'},Code ={'AP'}>} Items) / Count({<Status-={'REJECTED'}>}Items), Items))

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)
datashaw
Contributor III
Contributor III
Author

The given expression does not give me a count. 

please help me with the right expression.


=Sum({<Items = {"=(Count({<Status-={'REJECTED'},Code ={'AP'}>} Items)
/
Count({<Status-={'REJECTED'}>}Items))<0.5"}>}

Aggr(NODISTINCT Count({<Status-={'REJECTED'},Code ={'AP'}>} Items)
/
Count({<Status-={'REJECTED'}>}Items), Items))

datashaw
Contributor III
Contributor III
Author

Dear  expert,

 

its giving me the below screenshot instead of just a  % count