Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have date and sales column in my dataset. I wanted to show yearly, quarterly and monthly sales.
and the catch is if I select a filter for year then the visual show me sales for particular year and i want a another visual which shows me the previous year sales,
similarly, for the quarter if i select 2005 Q1 then another visual will show 2004 Q4 and for the month if I select feb 2005 then the another visual will show previous month which is jan 2005.
at the end i need previous year/quarter/moth values of the selected filters.
Kindly help me with the same
Hi, if it's in a table you can add columns for current year, quarter and month, and previous year, quarter and month. And add show conditions to each column.
For KPIs or other objects without the show conditions for dimensions you can add all conditions and expressions in the same expression, like:
If(GetSelectedCount(MonthField)
,ExpressionForCurrentOrPreviousMonth
,If(GetSelectedCount(QuarterField)
,ExpressionForCurrentOrPreviousQuarter
,If(GetSelectedCount(YearField)
,ExpressionForCurrentOrPreviousYear
)))
Refer this article, users can chose and compare any selected period on a single dimension
https://community.qlik.com/t5/Member-Articles/Period-Presets-Compare-Periods-on-the-fly/ta-p/1486371
Dear @rubenmarin,
Thank you for your kind reply,
Ill surely try this and let you know if this works.
Dear @rubenmarin
Could you please provide me expression for the same, as i am totally new to this am having trouble with expressions.
my month field :
ORDERDATE.autoCalendar.Month