Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
the following is my expression with field (Value6Months)and it worked perfectly, Now I am using variable ($(Last6value) instead of field . When I was using the field it gave me limited data according to the expression now with variable it gives me all values. how to put variable ($(Last6value)) in the expression instead of field ( Value6Months)?
my variable is :$(Last6value)---Sum({<Date = {"$(='<=' & Date(today(),'YYYY-MM-DD'))"},Date= {"$(='>=' & DATE(MonthStart(Today(),-6),'YYYY-MM-DD'))"},[SA Status]={' Receipt'}>} [Total Value])
Expression:
Sum(Aggr(
If( Rangesum(Above(Sum( Value6Months)/Sum(total Value6Months),1,RowNo()))<=0.8,
Sum(Value6Months)),
([GSC Vendor Name],(=Sum(Value6Months),desc))
))
Thanks.
You should just have to replace the Value6Months with Last6Value
You shouldn't need dollar-sign expansion since the expression in the variable is already written that way.
Try deleting one of the Value6Months and start typing Last6Value in its place; Qlik will recognize what you are doing and a tooltip should popup saying [Last6Value variable], along with other similarly named columns, variables, etc. and you can click it to make sure you have the format correct.
I tried to replaced the field with variable without $ it gave me zero values. I tried the following expression:
Sum(Aggr(
If( Rangesum(Above(Sum(vLast6value)/Sum(total vLast6value),1,RowNo()))<=0.8,
Sum(vLast6value)
)
,
([GSC Vendor Name],(=Sum(vLast6value),desc))
))
Thanks!
If you open your variable list, does it show the value of Last6Value as zero?
I can see in the value is expression not any value.
I am using the following right now , it gives me all values not according to the <=0.8.
Sum(Aggr(
If( Rangesum(Above($(vLast6value)/sum (total $(vLast6value)),1,RowNo()))<= 0.8,
$(vLast6value))
,
([GSC Vendor Name],(=$(vLast6value),desc))
))
You see an expression in the "Value" column for the variable?
Mine looks like this; the variable expression should evaluate or there might be a problem with the expression itself:
i just put = in the beginning of the variable and I can see the value but with the variable expression I got zeros still.
=Sum({<Date = {"$(='<=' & Date(today(),'YYYY-MM-DD'))"},Date= {"$(='>=' & DATE(MonthStart(Today(),-6),'YYYY-MM-DD'))"},[SA Status]={' Receipt'}>} [Total Value])
Returns zero? Or
Sum(Aggr(If( Rangesum(Above($(vLast6value)/sum (total $(vLast6value)),1,RowNo()))<= 0.8,$(vLast6value)),([GSC Vendor Name],(=$(vLast6value),desc))))
Returns zero?
Sum(Aggr(If( Rangesum(Above($(vLast6value)/sum (total $(vLast6value)),1,RowNo()))<= 0.8,$(vLast6value)),([GSC Vendor Name],(=$(vLast6value),desc))))
it gives me perfect values but all values not limited.
Thanks.