Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
ramusubramani
New Contributor II

date in set analysis

Hi Qlikivew Team

I have table as below

  

TransDateServerTransAmt
1/15/2016JAD50
2/26/2016JAD60
3/2/2016JAD75
3/15/2016JAD86
1/15/2016ZEO25
2/26/2016ZEO65
3/2/2016ZEO58
3/15/2016ZEO85

i have to create pivot table  as below and it has change appropriately when i make selection in TransDate filter . Please help me to create variable  for max dt and previous dt and  include with pivot table expression

Dimension    Exp1                    Exp2

Server          Max(Transdate)     Previous Dt

                    eg 3/15/2016        eg 3/2/2016

JAD             86                            75

ZEO              85                            58

Can you please guide me when we have use set analysis formula and when we have to use normal formula, please provide the some scanario and material for reference

regards

Ramu

Tags (1)
5 Replies
Chanty4u
Esteemed Contributor III

Re: date in set analysis

Re: date in set analysis

try like this

1. Add Server  as the dimension

2. Expression 1 = sum({<TransDate={"=max(TransDate)"}>}TransAmt)

2. Expression 2 = sum({<TransDate={"=max(TransDate,2)"}>}TransAmt)

Re: date in set analysis

Make sure that the Dates are in proper Date format. Then use below expression


Expression 1 = sum({<TransDate={"$(=date(max(TransDate)))"}>}TransAmt)

Expression 2 = sum({<TransDate={"$(=date(max(TransDate)-1))"}>}TransAmt)

Re: date in set analysis

Use this expressions,

Sum({<TransDate ={"$(=Max(TransDate))"}>}TransAmt)

Sum({<TransDate ={"$(=Max(TransDate,2))"}>}TransAmt)

Not applicable

Re: date in set analysis

Hi,

Please try this.


Expression 1 = sum({<TransDate={"$(=max(TransDate))"}>}TransAmt)

Expression 2 = sum({<TransDate={"$((=max(TransDate)-1))"}>}TransAmt)


or make 2 variables

vmaxdate=max(TransDate)

vpreviousdate=max(TransDate)-1


Expression 1 = sum({<TransDate={$(vmaxdate)}>}TransAmt)

Expression 2 = sum({<TransDate={$(vpreviousdate)}>}TransAmt)