Skip to main content
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)

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
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))

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