Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i am having a table consist of fields Customer,sales id,sales,ShipDate,product,quantity and i have linked ShipDate to master calender.
and the issue is that i have to create
straight table having below expressions
Current Year Sales, Previous Year Sales, Current Month Sales, Previous month Sales and product as dimension
thanks!!!!!!!!
Hi,
You need to take help of the set analysis to achieve this.
Have a look at the link below for more info on how to find the current year and previous year sales.
Set Analysis for certain Point in Time
Regards,
Kaushik Solanki
To do this you need to add a Calculated Dimension. Here are some hints on how to achieve this:
YTD and MTD Calculation in Qlikview - YouTube
Hope this might help you
Regards,
MB
Hi
Try this: Current Year Sales
Sum({<Year=, Quarter=, Month=, ShipDate={'>=$(=YearStart(Today()))<=$(=Today())'}>} Sales )
Previous Year:
Sum({<Year=, Quarter=, Month=, ShipDate={'>=$(=YearStart(Today(), -1))<=$(=Today())'}>} Sales )
Hope it helps!!
Hi
For Current Month:
Sum({<Year=, Quarter=, Month=, ShipDate={'>=$(=MonthStart(Today()))<=$(=Today())'}>} Sales)
Previous Month:
Sum({<Year=, Quarter=, Month=, ShipDate={'>=$(=MonthStart(Today(), -1))<=$(=Today())'}>} Sales )
Hope it helps!
Current Year Sales
Sum({<Year = {Max(Year(ShipDate))}>}Sales)
Previous Year Sales
Sum({<Year = {Max(Year(ShipDate)-1)}>}Sales)
Current Month Sales
Sum({<Month = {Max(Month(ShipDate))}>}Sales)
Previous Month Sales
Sum({<Month = {Max(Month(ShipDate)-1)}>}Sales)
what is wrong in this syntax: Sum({$-1<Year={year(today())}>}total_sales)
what is wrong in this syntax: Sum({$-1<Year={year(today())}>}total_sales)
Should most likely be this:
Sum({$-1<Year={$(=year(today()))}>}total_sales)
So what you missed was the dollar sign expansion.
Dollar-sign expansions ‒ Qlik Sense