Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i want to show sales >= target
i have some of product each product have the sales and target.my dimension is product
i want to show in bar chart which product sales values is greater or equal to the target values.
i dont want to show the sales values which are below the target values
Try like:
Dimension: Product
Exp: Sum({<Product={"=Sum(Sales)>=Sum(Target)"}>}Sales)
Try like:
Dimension: Product
Exp: Sum({<Product={"=Sum(Sales)>=Sum(Target)"}>}Sales)
if(sum(sales) >= sum(target),sum(sales))
this will only show the sales by product that are greater than the target
I guess you can use Calculated Dimension like:
if((aggr(sum(sales), Product)>=(aggr(sum(Targets), Product), ProductDimension) as Product_Dimension
and expression as per your requirement.
Else you can create a flag at Script/Backend if all the fields are in one table.
Hope this will help!!
Hi Tresesco,
Just a question. Each product have some target, so why you used sum(Target) in the expression.!!
It should be like Sum({<Product={"=Sum(Sales)>=Target"}>}Sales). Right?
Correct me If I am wrong.
There could be multiple sub lines to that. What if I wish to have aggregated result irrespective of say a dimension Region? Otherwise, logically you are not wrong. But it's safer to use an aggregation function, after all that doesn't harm you here.
Thanks for the explanation.