Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day!
Colleagues, tell me please, has QV some function to get index number of values in some field (not in load script)
Model and necessary WeekNumber in attached file.
Thanks.
In that table. By weeks.
Hello!
you can use recno() and expression like sum({<Rec = {">=$(=max(total Rec)-14) "}>}Sales).
See example
Hi ,
can you provide your required Output,
Check this,
Hirish
Thanks for your solution.
But i need calculate sum without changing script (model has more 3 hours for reload)
My required output in attached model
ok,
try this expression
if(sum(total if(left(YearWeek,4)=left(max(total YearWeek),4),1,0))<14,
sum( {<YearWeek = {">$(=max(total if(left(YearWeek,4)<>left(max(total YearWeek),4),YearWeek ))-14+sum(total if(left(YearWeek,4)=left(max(total YearWeek),4),1,0))) "}>}
Sales)
, sum( {<YearWeek = {">$(=max(total YearWeek) -14)"}>}Sales)
)
It's difficult, but the only thing that I thought of
Hi ,
Hope this is what you required,
Two Dimensions:
=Aggr(Mid(YearWeek,1,4),YearWeek) as Year
=Aggr(Mid(YearWeek,5,6),YearWeek) as week
Expression:
=If(YearWeek>='201540',Sum(Sales))
Output:
Hope this helps,
PFA,
Hirish
In your example, if add YearWeek 201602, we should to change expression If(YearWeek>='201541',Sum(Sales))
So, we always should to change expression manually, the chart is not automatic
Hi,
Yes,It will be after '201601' right.I think new entries are required.
or Else
we can write conditional expression like this,
=If(YearWeek>='201540' and YearWeek<='201601',Sum(Sales))
Hope this helps,
Hirish
Dear colleagues, thanks for your help!
My charts must be calculated on automatic base.
Maybe your give me advice how to get YearWeek index number in load script?