Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Sam_Thomas
Creator
Creator

Calculate percentage only if other criteria is met

Hi 

I have an expression that gives me a percentage of Out of Date items. But I want to only perform this calculation if there are more than X number of total items at the site. 

As at the moment, I have many sites in my graph showing up as 100% OOD (Out of Date), but all these sites only have one item. 

So I want to add in the condition that "if site has 3 or more items, then calculate the percent of items that are out of date".

See current, basic % expression below. 

Count(IF("OOD FLag"=1,[OOD FLag])) / count([OOD FLag])

 

Thanks

Labels (1)
1 Reply
Chanty4u
MVP
MVP

Try this 

If(count([Item])>=3,Count({< "OOD Flag"=1 >} [Item]) / Count([Item]))