Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i want to display only those dimensions in bar chart whose sales are Maximum and Minimum rest i don't want to show. Is it possible?
thanks
Harlin
any answer to my question??
tell me alternative way if u can please
thanks
Hi,
look at the example, i give u 2 possibility
C u,
Stefano
Hi Harleen,
Here is the example and explanation.
I would always use the variables in this situation. Because re-usability of variables gives you advantage in code management. So I would declare two variables...something like this :
vMaxValue
=Max({1} Aggr( COUNT({1} OrderId), Year))
vMaxValue
=Min({1} Aggr( COUNT({1} OrderId), Year))
The above variables calculate the Max & Min values across all the OrderId's. In your case you might want to use Sum(Sales) and Aggr with the dimension.
Then I would use simple IF conditional statement. Something like this...
IF(COUNT(OrderId) = (vMaxValue), COUNT(OrderId), IF(COUNT(OrderId) = (vMinValue), COUNT(OrderId)))
I am attaching the example for your reference. Good luck!
I hope this helps.
Cheers - DV
thank u so much. Your solution works perfectly. My logic was also correct which was this
If(aggr(Sum (Netamountpaid),ProductCategoryID)=max(aggr(Sum (Netamountpaid),ProductCategoryID)),
Sum(Netamountpaid))
But i was not using total keyword as u used. I don't know the meaning of total?
but if i put max(aggr(Sum (Netamountpaid),ProductCategoryID)) in a variable then it works without total keyword.
can u explain me this confusion?
thanks
Harleen
D V. also works well
Hi harleen,
this is taken from the "QlikView help":
"If the word total occurs before an expression, the calculation will be made over all possible values given the current selections, but disregarding the chart dimensions"
I hope this help you.
Stefano.
Thanks Stefano,
i understood now.
i am using this formula max(total aggr(Sum (Netamountpaid),ProductCategoryID))
what if i want to use Drill down group of Productcategory, then subcategory then product name in place of ProductCategoryID?
thanks
Harleen