8 Replies Latest reply: Jan 23, 2017 8:32 AM by Paolo Deregibus

# Show bar chart with sales where stores achieve at least 90% of target

I have made a bar chart before where I have to show Top 10 Stores for sales. The formula I used is as below:

Sum({<Store = {"=Rank(Sum(Sales))<=10"}>} Sales)

Now I am trying to find those stores which have achieved 90% of their targets and show there sales. I am trying the below formula which is not working:

Sum({<Store = {"=Sum(Sales)/Sum(Target) >=0.9"}>} Sales)

Pls. help what mistake I am making here.

• ###### Re: Show bar chart with sales where stores achieve at least 90% of target

TRy

Sum({<Store = {"=(Sum(Sales)/Sum(TOTAL <Store> Target)) >=0.9"}>} Sales)

or

Sum({<Store = {"=Sum(Sales) >= (Sum(Target)*0.9)"}>} Sales)

or

if(Sum(Sales)/Sum(Target) >=0.9,sum(Sales))

• ###### Re: Show bar chart with sales where stores achieve at least 90% of target

none working.

• ###### Re: Show bar chart with sales where stores achieve at least 90% of target

Provide sample data or sample application.

• ###### Re: Show bar chart with sales where stores achieve at least 90% of target

This should work..

SUM({<Store = {"=SUM(Sales)/SUM(Target)>=0.9"}>}Sales)

If this is not working, better if you can provide sample data or your sample application to test.

• ###### Re: Show bar chart with sales where stores achieve at least 90% of target

sum({<Store={"=sum(Sales)>=(sum(Target)*0.9)"}>} Sales)

It is same as what Vineeth suggested. 2nd one.  If you have Targets per Store.

• ###### Re: Show bar chart with sales where stores achieve at least 90% of target

I have excluded the stores in two ways:

1. using the dimension limit tab
2. using an if statement in the dimension

Please take a look at the attached file. Is that what you wanted to achieve?