Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
kindly suggest me what i am missing in my expression please
i have a straight table chart with
3- Dimensions: p_Material
VENDOR CODE
CATEGORY DESCRIPTION1
1- Expression:
sum(aggr(Avg({<BVALIDFROM={"<$(=Date(yearstart(today(),0,4),'DD-MM-YYYY'))"},BVALIDTO={">$(=Date(yearstart(today(),0,4),'DD-MM-YYYY'))"}>}distinct BPrice)*sum(VOLUME),p_Material,[VENDOR CODE]))
what i am doing is avg of BPrice * sum of Volume group by p_Material,Vendor code.......
the Total i am getting is :33478046
when i tried to implement the same in bar chart with
1- Dimension : CATEGORY DESCRIPTION1
1- Expression(Same):
sum(aggr(Avg({<BVALIDFROM={"<$(=Date(yearstart(today(),0,4),'DD-MM-YYYY'))"},BVALIDTO={">$(=Date(yearstart(today(),0,4),'DD-MM-YYYY'))"}>}distinct BPrice)*sum(VOLUME),p_Material,[VENDOR CODE]))
then Total i am getting is :3470522589.32
Even thought i am using the same expression and same dimension i am getting two different total .Is that because of aggregation?
naveen kumar wrote:
Even thought i am using the same expression and same dimension i am getting two different total .Is that because of aggregation?
You are not using the same chart dimensions.
Note that in first case, your chart dimensions are probably more granular than the aggr() dimensions, so you are running into
(DISTINCTNESS of aggr() returned values)
Hello Stefan, thanks for your quick reply,
Do I need to change the way I had return my expression....sorry I in this qlik only from last 7 months