Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
ramusubramani
Contributor II
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

5 Replies
avinashelite

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)

Kush
MVP
MVP

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)

tamilarasu

Use this expressions,

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

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

Not applicable

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)