Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to show last 6 months data from the currently selected month in a chart.
Unfortunately file size is high because of which I am not able to attache the qlik file.
Please find attached screenshot for the same.
Please let me know any other detail required
Require your help to solve.
Hi All,
I have attached a sample qlik application.
Request your kind help on this.
Also please note that, if I select a month Feb for year 2018 & then it should show me the data from Sept 2017 to Feb 2018.
Thanks.
Hi Piyush,
Will you please provide shredded sample data, it would be help-full.
Thanks and regards,
Yogendra W.
See below example. Suppose order date is the selection you are making
declare 2 variables
vTestDate - =if(GetSelectedCount(OrderDate)=1,OrderDate,0)
vTestDateMinus6 - =if(GetSelectedCount(OrderDate)=1,Date(AddMonths(OrderDate,-6)),0)
your expression
if(vTestDate=0, Sum( OrderRecordCounter),Sum( {<OrderDate={"<=$(=vTestDate) >=$(=vTestDateMinus6)"}>} OrderRecordCounter))
the if condition is to show all the values if no order date is selected
Hope it helps
Hi Yogendra,
Please find attached sample qlik file.
Thanks,
Piyush
Hi Dilip,
Thanks for your reply.
I have attached sample qlik file for your reference.
Did a quick check of you app. You cant have month as a dimension as well as a set modifier.
You can use a variation of my example to create a year month variables start and end and use that in the set analysis
Hi Dilip,
Could you please elaborate more. Also it would be helpful if you do some changes in my app & rectify it which will give me desired output. Also you have mentioned of your variety of example, could you please share those as well so that it would be helpful for future app development.
Create a Date field like:
Load
MakeDate(Year, MonthNumber) as Date
Then at the UI, you could use simpler expression like:
=Sum({<Date={">$(=MonthEnd(Max(Date),-6)) <=$(=Date(Max(Date)))"}>}Actual)
Hi Tresesco,
Thanks for your reply. Unfortunately the formula provided by you is not working as expected.
Have you created a date field as suggested? Could you share your sample with date field to work on?