Discussion board where members can get started with QlikView.
I have a table:
the Cumulative P&L is
the drawdown is defined as drop from previous peak cumulative P&L
so Max drawdown is 300
I want to put it in the qlivkiew formula so that when I select a range of dates, the max drawdown value is automatically calculated.
QlikView calculation is dynamic. In your case, put Max(Drawdown) in text box. Add Date list box.
Select the date ranges from list box, you can see that text box value changes based on your date range selection.
Vinod Kumar V
but I need qlikview to calculate the drawdown.
To do this in the load script:
RangeMax(0, PeakPnL- CumPnL) As Drawdown
RangeMax(Peek(PeakPnL), CumPnL) As PeakPnL
PnL + Alt(Peek(CumPnL), 0) As CumPnL
LOAD Date(Date#(Year(Today()) & Date, 'YYYYMMMM D')) As Date,
(change the inline load to your actual data source)
this doesn't work as cumpnl needs dynamically change upon the dates selected.
e.g. if I select only May 5 and May 6, the cumpnl is -100, -300, and drawdown are 0