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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reg: Display current week and previous week

Hi All,

I have bar chart, for that i need to display the current week data as one bar and the previous week data as another bar by default. when we select a date,it should consider the week of that date as current week and the previous week of that as previous. how can i achieve the same.

Thanks in advance

Labels (1)
17 Replies
Not applicable
Author

Hi,

Kindly find the attached.

Not applicable
Author

Use these expressions inplave of your expressions

CurrentWeek  

= sum({<I_PLANT={'Autofit Daruhera Plant'},Week={$(=Max(Week))}>}

I_CURRENT_REQ_QTY)

PrevWeek 

= sum({<I_PLANT={'Autofit Daruhera Plant'},Week={$(=Max(Week-1))}>}

I_CURRENT_REQ_QTY)

Not applicable
Author

Hi,

Now its showing the Max Week Default, but when i select any other filters other than 'Week' only the current month data is displaying..

its_anandrjs
Champion III
Champion III

Your Current Expression

=sum({<Week={$(=Max(Week))},I_PLANT={'Autofit Daruhera Plant'}>} I_CURRENT_REQ_QTY)

and Previous expression

= sum({<I_PLANT={'Autofit Daruhera Plant'},Week={$(=Max(Week)-1)}>} I_CURRENT_REQ_QTY)

its_anandrjs
Champion III
Champion III

I suggest it is due to you select in expression data only for I_PLANT={'Autofit Daruhera Plant'} may be due to this please check this filter.

israrkhan
Specialist II
Specialist II

Hi Reena,

Check the Attached..

May it Help..

Khan

Not applicable
Author

hii,

i have tried this.hope its workin nw..

=sum({<Week={$(=Max(Week))},Cust_Week=,@_Date=,Year=,Day=,@_Month=,I_PLANT={'Autofit Daruhera Plant'}>} I_CURRENT_REQ_QTY)

= sum({<I_PLANT={'Autofit Daruhera Plant'},Week={$(=Max(Week-1))},Cust_Week=,@_Date=,Year=,Day=,@_Month=>} I_CURRENT_REQ_QTY)

its_anandrjs
Champion III
Champion III

Yes correct bu using this way you by pass the selections for this fields

Cust_Week=,@_Date=,Year=,Day=,@_Month=

=sum({<Week={$(=Max(Week))},Cust_Week=,@_Date=,Year=,Day=,@_Month=,I_PLANT={'Autofit Daruhera Plant'}>} I_CURRENT_REQ_QTY)

= sum({<I_PLANT={'Autofit Daruhera Plant'},Week={$(=Max(Week-1))},Cust_Week=,@_Date=,Year=,Day=,@_Month=>} I_CURRENT_REQ_QTY)