Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi...Every one.
I am new to QlikSense I would like to ask you how wen achieve the following formula in Qliksense line chart here i have attached the sample data set and required formula ....
the above data related to budget and client wants a line chart with fiscal months(Apr22 to March23) on X axis and lines based on the below formula on Y Axis
Please help to do this Thank you in advance.
@Pa1K It would be nice if you can attach the sample data in the form of excel, the attached screen shot does not help much to resolve your issue.
Dear @sidhiq91 Please find the attached Excel file
Dear @sidhiq91 Could you please check ,Help me with the requirement
@Pa1Kumar Yes I am going to work on it now. You want different line chart for different formulae that you have attached above. Also, Provide expected output in the form of line chart so that it could be easier for me to understand.
Dear @sidhiq91 thank you for your time and patience.
This is is the required form of line chart, We could do that for individual months and calculated the same, but code has become very huge,
example you can find it below for October month:
But we need the code by using some generic format either using by for-next/while which I don't understand.
--------------------------------------------------------------------
if(F_Month='10',RangeSum(previous(CHANGE_PRICE),Previous(previous(CHANGE_PRICE)),
Previous(Previous(previous(CHANGE_PRICE))),Previous(Previous(Previous(previous(CHANGE_PRICE)))),
Previous(Previous(Previous(Previous(previous(CHANGE_PRICE))))),
Previous(Previous(Previous(Previous(Previous(previous(CHANGE_PRICE)))))))*PLN_QTY
+RangeSum(Previous(Previous(Previous(Previous(Previous(previous(PLN_QTY)))))),Previous(Previous(Previous(Previous(previous(PLN_QTY))))),
Previous(Previous(Previous(previous(PLN_QTY)))),
Previous(Previous(previous(PLN_QTY))),Previous(previous(PLN_QTY)),
previous(PLN_QTY),PLN_QTY)*CHANGE_PRICE )as OctVal,
---------------------------------------------
after calculating it for all of the months we used crosstable as below:
----------------------------------------
MONTHVAL:
CrossTable(FMonth,MonthlyValue,7)
LOAD *,
//F_Month as PCDMonth,
AprVal,// as APRv,
Mayval,// as MAYv,
JunVal,// as JUNv ,
JulVal,// as JULv,
AugVal,// AS AUGv,
SepVal,// AS SEPv,
OctVal,// as OCTv,
NovVal,// as NOVv,
DecVal,// as DECv,
JanVal,// as JANv,
FebVal,// as FEBv,
MarVal// as MARv
resident PCDBud_Res
//Group By F_Month;
order by ModelCode,F_Year,F_Month;
drop Table PCDBud_Res;
--------------------------------------
now we could make the graph ,Please help me to simplify code using looping statement....
Thank you.
hi @sidhiq91 hope you have got the scenario and please help me on this