Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am displaying sales, profit etc in columns of a table and grouping the rows by Season. I am required to show the values for the previous year in the same row, but different columns.
Problem is, the previous year data shows in a different Season group, because I am looking at the previous years data.
Season Group expression:
=AGGR(ONLY({$<F_Year_Week={"$(vSelectedYears)"}, WK={"$(vSelectedWeeks)"}>} StockSeason), StockSeason)
Example of one of previous years column expression:
Sum({$<SalesType={'Sale'}, FP_MD={'FP'}, F_Year_Week ={"$(vPrevSelectedYear)"}, WK={"$(vSelectedWeeks)"}>} Price)
All data selection is controlled by a date island and selections on screen are stored in the vSelectedYears & vSelectedWeeks variables. vPrevSelectedYear is derived from vSelectedYears.
App works fine, but shows the previous year info in a different season group.
Your expertise and any assistance is much appreciated.
David
So I have had to give in and load the complete Sales dataset a second time to try and resolve the issue.
This does feel like an inelegant solution given Qlik's power. I had hoped there would be some set expression magic I could use here.
Hi Prashant,
thanks for your reply. Does this help (attached)?
Thanks,
David
example data..
Multiple tables.
I don't think i could move the logic into the load script; it needs to be dynamic, depending on what date range user selects. plus there are additional columns for stock, coming from another table. And the date island table of course.
Thanks,
David
guys / gals,
am i wrong here? Can the expressions be put in the load script when the date ranges are selected in the UI by the user? And these ranges select records in date island?
Happy to accept I'm being thick here 🙂
Thanks.
David
Hi Dave,
Please attache sample data. You can anonymous the data.
Hi Gabriel,
hows this?
Hi Dave,
Your filters in the expression has to be same except for vSelectedYears & vPrevSelectedYear. Try that and let me know