Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Guys
I tried to do sum w.r.t dimension, but i am not able to get it
Can someone help me out.
T1:
Load * INline [
MAT_Num,MAT,Stock
320,H320,100
320,X320,120
320,U320,90
320,S320,130
240,H240,110
240,S240,130
240,U240,100
240,X240,140
];
Output:
I need All 320 Materials with 440 and 240 with 480
Thanks in Advance
Try:
Sum(total <MAT_Num> Stock) // however, this would require the MAT_Num dimension to be there in the chart
However, for some reason if you want to stick to aggr(), then try:
Sum(Aggr(NODISTINCT Sum( Stock),MAT_Num))
Note: Expression without aggr() would a better performing one.
Thank you Tresesco .
It is working fine for the sample which i have give,
But when i tried to implement the same in my actual application, it is not working.
Could you please elaborate the significance of NODISTINCT in the expression.
Try:
Sum(total <MAT_Num> Stock) // however, this would require the MAT_Num dimension to be there in the chart
However, for some reason if you want to stick to aggr(), then try:
Sum(Aggr(NODISTINCT Sum( Stock),MAT_Num))
Note: Expression without aggr() would a better performing one.
Thank you Tresesco .
It is working fine for the sample which i have give,
But when i tried to implement the same in my actual application, it is not working.
Could you please elaborate the significance of NODISTINCT in the expression.
Aggr tends to put a value for unique combination of dimension POV (point-of-view), i.e. - it populates only the first POV (dimension combination) value and put null for rest. One nice example here: https://community.qlik.com/t5/QlikView-App-Development/What-NODISTINCT-parameter-does-in-AGGR-functi...