Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to write expression for rolling dimension?

Hi,

I have the following requirement :- there r 7 dimensions namely- month , raw material,job,work center,commodity,plant ,zone and three expressions namely standard cost, planned cost, budget cost . i need to create the pivot table for these , the expression for standard cost is

if isnull({actual_cost})or

  isnull({actual_qty})

then 0

else {actual_cost} *    {actual_qty}

Also the expressions should have 12 months rolling period . i.e. if i click on 2011 dec then data should get displayed for 12 months from dec 2010 till dec 2011.

Help me with the expression.....

Labels (1)
1 Reply
jagan
Partner - Champion III
Partner - Champion III

Hi,

Use this expression

=Sum({<DateFieldName={'>=$(MonthStart(Max(DateFieldName), -12)) <=$(MonthEnd(Max(DateFieldName))) '}>} Alt(actual_cost, 0) * Alt(actual_qty, 0))

Hope this helps you.

Regards,

Jagan.